Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -12
Dockerfile
CHANGED
|
@@ -2,26 +2,20 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
ENV PYTHONPATH=/app
|
| 7 |
|
| 8 |
-
# Install system dependencies (
|
| 9 |
RUN apt-get update && apt-get install -y gcc
|
| 10 |
|
| 11 |
-
# Copy
|
| 12 |
-
COPY
|
| 13 |
|
| 14 |
# Install Python dependencies
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
COPY . .
|
| 19 |
-
|
| 20 |
-
# Create uploads directory
|
| 21 |
RUN mkdir -p /app/uploads
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
EXPOSE 7860
|
| 25 |
-
|
| 26 |
-
# Run FastAPI app (HF Spaces friendly)
|
| 27 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Fix Python package path for HF Spaces
|
| 6 |
ENV PYTHONPATH=/app
|
| 7 |
|
| 8 |
+
# Install system dependencies (HF Spaces needs this sometimes)
|
| 9 |
RUN apt-get update && apt-get install -y gcc
|
| 10 |
|
| 11 |
+
# Copy project files
|
| 12 |
+
COPY . .
|
| 13 |
|
| 14 |
# Install Python dependencies
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Create uploads folder
|
|
|
|
|
|
|
|
|
|
| 18 |
RUN mkdir -p /app/uploads
|
| 19 |
|
| 20 |
+
# Run FastAPI app
|
|
|
|
|
|
|
|
|
|
| 21 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|