# For CPU
FROM ubuntu:16.04

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh

COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh

COPY install/ubuntu_install_emscripten.sh /install/ubuntu_install_emscripten.sh
RUN bash /install/ubuntu_install_emscripten.sh

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh

RUN chmod a+rwx -R /emsdk-portable
RUN cp -r /emsdk-portable  /emsdk-portable-backup
RUN mv /emsdk-portable  /emsdk-portable-x
RUN mv /emsdk-portable-backup /emsdk-portable
RUN cp /root/.emscripten /emsdk-portable/
