Spaces:
Sleeping
Sleeping
saniaE commited on
Commit ·
6896346
1
Parent(s): 2316433
fixed docker image
Browse files- Dockerfile +6 -11
Dockerfile
CHANGED
|
@@ -1,31 +1,26 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
# Fix
|
| 6 |
-
RUN rm /etc/apt/sources.list.d/cuda.list || true
|
| 7 |
-
RUN rm /etc/apt/sources.list.d/nvidia-ml.list || true
|
| 8 |
-
|
| 9 |
-
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
libgl1-mesa-glx \
|
| 12 |
libglib2.0-0 \
|
| 13 |
-
git \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
RUN pip install --no-cache-dir --upgrade pip==
|
| 17 |
|
|
|
|
| 18 |
RUN useradd -m -u 1000 user
|
| 19 |
ENV HOME=/home/user \
|
| 20 |
PATH=/home/user/.local/bin:$PATH
|
| 21 |
-
|
| 22 |
WORKDIR $HOME/app
|
| 23 |
|
|
|
|
| 24 |
COPY requirements.txt .
|
| 25 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 26 |
|
| 27 |
-
COPY . .
|
| 28 |
-
RUN chown -R user:user $HOME/app
|
| 29 |
|
| 30 |
USER user
|
| 31 |
|
|
|
|
| 1 |
+
FROM nvcr.io/nvidia/tensorflow:20.01-tf1-py3
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
# Fix for potential GPG key issues in older containers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
libgl1-mesa-glx \
|
| 8 |
libglib2.0-0 \
|
|
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade pip==22.3.1
|
| 12 |
|
| 13 |
+
# Create Hugging Face user
|
| 14 |
RUN useradd -m -u 1000 user
|
| 15 |
ENV HOME=/home/user \
|
| 16 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
| 17 |
WORKDIR $HOME/app
|
| 18 |
|
| 19 |
+
# Install requirements
|
| 20 |
COPY requirements.txt .
|
| 21 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
+
COPY --chown=user:user . .
|
|
|
|
| 24 |
|
| 25 |
USER user
|
| 26 |
|