forked from Unity-Technologies/datasetinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (31 loc) · 1.36 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
FROM nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04
RUN apt-get update \
&& apt-get install -y \
build-essential \
curl \
libsm6 \
libxext6 \
libxrender-dev \
libgl1-mesa-dev \
python3.7-dev \
python3-pip \
&& ln -s /usr/bin/python3.7 /usr/local/bin/python
# Pin setuptools to 49.x.x until this [issue](https://github.com/pypa/setuptools/issues/2350) is fixed.
RUN python -m pip install --upgrade pip poetry==1.0.10 setuptools==49.6.0 -U pip cryptography==3.3.2
# pin cryptography to 3.3.2 until this (https://github.com/Azure/azure-cli/issues/16858) is fixed.
# Add Tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN chmod +x /usr/local/bin/tini
WORKDIR /datasetinsights
VOLUME /data /root/.config
COPY poetry.lock pyproject.toml ./
RUN poetry config virtualenvs.create false \
&& poetry install --no-root
COPY . ./
# Run poetry install again to install datasetinsights
RUN poetry config virtualenvs.create false \
&& poetry install
# Use -g to ensure all child process received SIGKILL
ENTRYPOINT ["tini", "-g", "--"]
CMD sh -c "jupyter notebook --notebook-dir=/ --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"