Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -10
Dockerfile
CHANGED
|
@@ -1,23 +1,19 @@
|
|
| 1 |
-
# Use lightweight Python 3.10
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
-
# Copy
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
ENV TMPDIR=/app/temp
|
| 18 |
|
| 19 |
-
#
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
-
# Start Uvicorn on port 7860
|
| 23 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install dependencies
|
| 6 |
COPY requirements.txt .
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
+
# Copy app code
|
| 10 |
COPY . .
|
| 11 |
|
| 12 |
+
# Setup temp directory for HF Spaces (non-root user)
|
| 13 |
+
RUN mkdir -p /tmp/verifier_uploads && chmod 777 /tmp/verifier_uploads
|
| 14 |
+
ENV TMPDIR=/tmp/verifier_uploads
|
|
|
|
| 15 |
|
| 16 |
+
# Hugging Face Spaces Port
|
| 17 |
EXPOSE 7860
|
| 18 |
|
|
|
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|