Update Dockerfile
Browse files- Dockerfile +7 -39
Dockerfile
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 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 \
|
|
@@ -22,41 +27,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 22 |
software-properties-common \
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
-
|
| 26 |
-
apt-get install -y nodejs && \
|
| 27 |
-
npm install -g configurable-http-proxy
|
| 28 |
-
|
| 29 |
-
# Create a working directory
|
| 30 |
-
WORKDIR /app
|
| 31 |
-
|
| 32 |
-
# Create a non-root user and switch to it
|
| 33 |
-
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
| 34 |
-
&& chown -R user:user /app
|
| 35 |
-
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
|
| 36 |
-
USER user
|
| 37 |
-
|
| 38 |
-
# All users can use /home/user as their home directory
|
| 39 |
-
ENV HOME=/home/user
|
| 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
|
| 46 |
-
|
| 47 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 48 |
-
COPY --chown=user . $HOME/app
|
| 49 |
-
|
| 50 |
-
RUN chmod +x start_server.sh
|
| 51 |
-
|
| 52 |
-
COPY --chown=user login.html /home/user/miniconda/lib/python3.6/site-packages/jupyter_server/templates/login.html
|
| 53 |
-
|
| 54 |
-
ENV PYTHONUNBUFFERED=1 \
|
| 55 |
-
GRADIO_ALLOW_FLAGGING=never \
|
| 56 |
-
GRADIO_NUM_PORTS=1 \
|
| 57 |
-
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 58 |
-
GRADIO_THEME=huggingface \
|
| 59 |
-
SYSTEM=spaces \
|
| 60 |
-
SHELL=/bin/bash
|
| 61 |
-
|
| 62 |
-
CMD ["./start_server.sh"]
|
|
|
|
|
|
|
| 1 |
FROM tensorflow/tensorflow:1.15.5-gpu-py3
|
| 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 |
+
RUN rm -f /etc/apt/sources.list.d/*.list
|
| 8 |
+
|
| 9 |
# Install some basic utilities
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
curl \
|
|
|
|
| 27 |
software-properties-common \
|
| 28 |
&& rm -rf /var/lib/apt/lists/*
|
| 29 |
|
| 30 |
+
# Continue with the rest of the Dockerfile...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|