Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
# Base image with
|
2 |
-
FROM
|
3 |
|
4 |
# Install system dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
|
|
7 |
wget \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
-
# Install Python packages including Hugging Face Transformers, TorchScript, Flask, and TensorFlow
|
11 |
RUN pip install --no-cache-dir \
|
12 |
torch \
|
13 |
torchvision \
|
@@ -16,7 +16,8 @@ RUN pip install --no-cache-dir \
|
|
16 |
Flask \
|
17 |
Pillow \
|
18 |
huggingface_hub \
|
19 |
-
tensorflow
|
|
|
20 |
|
21 |
# Set Hugging Face cache to a guaranteed writable directory
|
22 |
ENV TRANSFORMERS_CACHE=/tmp/cache
|
|
|
1 |
+
# Base image with a lightweight version suitable for Hugging Face Spaces
|
2 |
+
FROM python:3.8-slim
|
3 |
|
4 |
# Install system dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
|
|
7 |
wget \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
+
# Install Python packages including Hugging Face Transformers, TorchScript, Flask, TensorFlow, and TensorFlow Hub
|
11 |
RUN pip install --no-cache-dir \
|
12 |
torch \
|
13 |
torchvision \
|
|
|
16 |
Flask \
|
17 |
Pillow \
|
18 |
huggingface_hub \
|
19 |
+
tensorflow \
|
20 |
+
tensorflow_hub
|
21 |
|
22 |
# Set Hugging Face cache to a guaranteed writable directory
|
23 |
ENV TRANSFORMERS_CACHE=/tmp/cache
|