Update Dockerfile
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
|
@@ -1,18 +1,15 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Set environment
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
#
|
|
|
|
|
|
|
| 7 |
COPY requirements.txt .
|
| 8 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
-
# Copy app code
|
| 11 |
COPY app.py .
|
| 12 |
|
| 13 |
-
|
| 14 |
-
EXPOSE 8000
|
| 15 |
|
| 16 |
-
# Start server
|
| 17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 18 |
-
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Prevent permission errors with HuggingFace cache
|
| 6 |
+
ENV TRANSFORMERS_CACHE=/tmp/hf-cache
|
| 7 |
+
|
| 8 |
COPY requirements.txt .
|
| 9 |
+
RUN apt-get update && apt-get install -y ffmpeg && pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
|
|
|
| 11 |
COPY app.py .
|
| 12 |
|
| 13 |
+
EXPOSE 7860
|
|
|
|
| 14 |
|
|
|
|
| 15 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|