Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
-
# Install system
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
ffmpeg \
|
6 |
libsm6 \
|
7 |
libxext6 \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
-
# Set working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
-
# Copy
|
14 |
-
COPY . .
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
#
|
17 |
-
|
18 |
|
19 |
-
# Start server
|
20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
+
# Install system deps
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
ffmpeg \
|
6 |
libsm6 \
|
7 |
libxext6 \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
# Copy only requirements first for caching
|
13 |
+
COPY requirements.txt .
|
14 |
+
|
15 |
+
# Force huggingface-hub to install first
|
16 |
+
RUN pip install --no-cache-dir huggingface-hub==0.13.4
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
+
# Copy rest of the app
|
20 |
+
COPY . .
|
21 |
|
|
|
22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|