-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
56 lines (38 loc) · 1.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM python:3.9.9
RUN mkdir app
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN apt-get update && apt-get install -y python3-opencv
RUN pip install opencv-python
RUN pip install cython
RUN pip install wheel
RUN pip install setuptools
COPY requirements.txt app
RUN cd app && pip install -r requirements.txt
COPY MontyCarlo app/MontyCarlo
COPY setup_linux.py app
COPY setup_version.py app
COPY setup.cfg app/setup.cfg
COPY README.md app
WORKDIR /app
# Building Monty Carlo...
RUN python setup_linux.py build_ext -j6 --inplace
ENV PYTHONPATH "${PYTHONPATH}:/app"
RUN python -c "import MontyCarlo"
# Setting up jupyter
# Install Jupyter
RUN pip install jupyter
# Expose the Jupyter port
EXPOSE 8888
RUN mkdir /notebooks
RUN mkdir /notebooks/geo
RUN mkdir /notebooks/mat
RUN mkdir /notebooks/out
WORKDIR /notebooks
RUN apt install -y libgl1-mesa-glx xvfb
RUN pip install panel
COPY jupyterStyle.css /app/jupyterStyle.css
RUN jupyter notebook --generate-config
RUN echo "c.NotebookApp.extra_static_paths = ['/app/jupyterStyle.css']" | tee -a ~/.jupyter/jupyter_notebook_config.py
# Start Jupyter Notebook
# CMD ["jupyter", "notebook", "--ip='0.0.0.0'", "--port=8888", "--no-browser", "--allow-root"]
# jupyter notebook --ip='0.0.0.0' --port=8888 --no-browser --allow-root