Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +15 -32
Dockerfile
CHANGED
|
@@ -1,43 +1,26 @@
|
|
| 1 |
-
FROM nvidia/cuda:
|
| 2 |
-
|
| 3 |
-
#FROM nvidia/cuda:11.6.1-devel-ubuntu20.04
|
| 4 |
-
|
| 5 |
-
#ENV TZ=Europe/Berlin
|
| 6 |
-
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
| 7 |
|
| 8 |
RUN apt-get update
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
RUN apt-get install -y python3 python3-pip git wget
|
| 14 |
|
| 15 |
-
WORKDIR /
|
| 16 |
|
| 17 |
-
COPY ./
|
| 18 |
|
| 19 |
RUN python3 -m pip install --upgrade pip
|
| 20 |
|
| 21 |
-
RUN pip install gradio
|
| 22 |
-
RUN pip install --no-cache-dir --upgrade -r /
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
# Set home to the user's home directory
|
| 31 |
-
ENV HOME=/home/user \
|
| 32 |
-
PATH=/home/user/.local/bin:$PATH
|
| 33 |
-
|
| 34 |
-
# Set the working directory to the user's home directory
|
| 35 |
-
WORKDIR $HOME/app
|
| 36 |
-
|
| 37 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 38 |
-
COPY --chown=user . $HOME/app
|
| 39 |
|
| 40 |
EXPOSE 7860
|
| 41 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 42 |
|
| 43 |
-
CMD ["python3", "app.py"]
|
|
|
|
| 1 |
+
FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
RUN apt-get update
|
| 4 |
+
RUN apt-get install -y python3 python3-pip git wget nano software-properties-common \
|
| 5 |
+
build-essential \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
WORKDIR /app
|
| 9 |
|
| 10 |
+
COPY ./req.txt /app/requirements.txt
|
| 11 |
|
| 12 |
RUN python3 -m pip install --upgrade pip
|
| 13 |
|
| 14 |
+
RUN pip install --no-cache-dir gradio
|
| 15 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 16 |
+
RUN pip cache purge \
|
| 17 |
+
&& apt-get autoremove -y \
|
| 18 |
+
&& apt-get autoclean \
|
| 19 |
+
&& rm -rf /tmp/* /var/tmp/* \
|
| 20 |
+
&& rm -rf /root/.cache/pip \
|
| 21 |
+
&& rm -rf /app/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
EXPOSE 7860
|
| 24 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 25 |
|
| 26 |
+
CMD ["python3", "app.py"]
|