Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -16,24 +16,22 @@ RUN apt-get update && apt-get install -y \
|
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
-
torch==2.1.0+cpu \
|
| 20 |
-
torchvision==0.16.0+cpu \
|
| 21 |
--index-url https://download.pytorch.org/whl/cpu
|
| 22 |
|
| 23 |
RUN pip install --no-cache-dir \
|
| 24 |
'git+https://github.com/facebookresearch/detectron2.git' \
|
| 25 |
--no-build-isolation
|
| 26 |
|
|
|
|
| 27 |
RUN pip install --no-cache-dir \
|
|
|
|
|
|
|
| 28 |
"huggingface_hub==0.23.4" \
|
| 29 |
-
"gradio==4.44.0" \
|
| 30 |
opencv-python-headless \
|
| 31 |
Pillow \
|
| 32 |
"numpy<2"
|
| 33 |
|
| 34 |
-
COPY app.py .
|
| 35 |
-
|
| 36 |
-
# Create cache dir and give ownership to user before switching
|
| 37 |
RUN mkdir -p /app/hf_cache && \
|
| 38 |
useradd -m -u 1000 user && \
|
| 39 |
chown -R user:user /app
|
|
|
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
+
torch==2.1.0+cpu torchvision==0.16.0+cpu \
|
|
|
|
| 20 |
--index-url https://download.pytorch.org/whl/cpu
|
| 21 |
|
| 22 |
RUN pip install --no-cache-dir \
|
| 23 |
'git+https://github.com/facebookresearch/detectron2.git' \
|
| 24 |
--no-build-isolation
|
| 25 |
|
| 26 |
+
# Pin gradio + gradio_client together to avoid the HfFolder/const bug
|
| 27 |
RUN pip install --no-cache-dir \
|
| 28 |
+
"gradio==4.44.1" \
|
| 29 |
+
"gradio_client==0.9.1" \
|
| 30 |
"huggingface_hub==0.23.4" \
|
|
|
|
| 31 |
opencv-python-headless \
|
| 32 |
Pillow \
|
| 33 |
"numpy<2"
|
| 34 |
|
|
|
|
|
|
|
|
|
|
| 35 |
RUN mkdir -p /app/hf_cache && \
|
| 36 |
useradd -m -u 1000 user && \
|
| 37 |
chown -R user:user /app
|