Update Dockerfile
Browse files- Dockerfile +3 -46
Dockerfile
CHANGED
@@ -1,12 +1,8 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
-
TZ=Europe/Paris
|
5 |
-
|
6 |
-
# Remove any third-party apt sources to avoid issues with expiring keys.
|
7 |
# Install some basic utilities
|
8 |
-
RUN
|
9 |
-
apt-get update && apt-get install -y --no-install-recommends \
|
10 |
curl \
|
11 |
ca-certificates \
|
12 |
sudo \
|
@@ -44,45 +40,6 @@ ENV HOME=/home/user
|
|
44 |
RUN mkdir $HOME/.cache $HOME/.config \
|
45 |
&& chmod -R 777 $HOME
|
46 |
|
47 |
-
# Set up the Conda environment
|
48 |
-
ENV CONDA_AUTO_UPDATE_CONDA=false \
|
49 |
-
PATH=$HOME/miniconda/bin:$PATH
|
50 |
-
RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
|
51 |
-
&& chmod +x ~/miniconda.sh \
|
52 |
-
&& ~/miniconda.sh -b -p ~/miniconda \
|
53 |
-
&& rm ~/miniconda.sh \
|
54 |
-
&& conda install -y python=3.6 && \
|
55 |
-
conda clean -ya
|
56 |
-
|
57 |
-
WORKDIR $HOME/app
|
58 |
-
|
59 |
-
#######################################
|
60 |
-
# Start root user section
|
61 |
-
#######################################
|
62 |
-
|
63 |
-
USER root
|
64 |
-
|
65 |
-
# User Debian packages
|
66 |
-
## Security warning : Potential user code executed as root (build time)
|
67 |
-
RUN --mount=target=/root/packages.txt,source=packages.txt \
|
68 |
-
apt-get update && \
|
69 |
-
xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
|
70 |
-
&& rm -rf /var/lib/apt/lists/*
|
71 |
-
|
72 |
-
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
73 |
-
bash /root/on_startup.sh
|
74 |
-
|
75 |
-
RUN mkdir /data && chown user:user /data
|
76 |
-
|
77 |
-
#######################################
|
78 |
-
# End root user section
|
79 |
-
#######################################
|
80 |
-
|
81 |
-
USER user
|
82 |
-
|
83 |
-
# Install TensorFlow 1.15 using Conda
|
84 |
-
RUN conda install -c conda-forge tensorflow-gpu=1.15
|
85 |
-
|
86 |
# Python packages
|
87 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
88 |
pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
1 |
+
# Use a pre-configured TensorFlow 1.15 Docker image
|
2 |
+
FROM tensorflow/tensorflow:1.15.5-gpu-py3
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Install some basic utilities
|
5 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
6 |
curl \
|
7 |
ca-certificates \
|
8 |
sudo \
|
|
|
40 |
RUN mkdir $HOME/.cache $HOME/.config \
|
41 |
&& chmod -R 777 $HOME
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
# Python packages
|
44 |
RUN --mount=target=requirements.txt,source=requirements.txt \
|
45 |
pip install --no-cache-dir --upgrade -r requirements.txt
|