Spaces:
Sleeping
Sleeping
Fix: Updated Dockerfile to use app.py entry point
Browse files- Dockerfile +10 -9
Dockerfile
CHANGED
|
@@ -2,17 +2,18 @@ FROM python:3.11-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
-
pydantic>=2.0 \
|
| 8 |
-
fastapi>=0.100 \
|
| 9 |
-
uvicorn>=0.20 \
|
| 10 |
-
openai>=1.0 \
|
| 11 |
-
faker>=18.0 \
|
| 12 |
-
pytest>=7.0
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
COPY . .
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
-
CMD ["python", "
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Copy requirements first for better caching
|
| 6 |
+
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
# Install dependencies using pip
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy all files
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
+
# Make sure app.py is executable
|
| 15 |
+
RUN chmod +x app.py
|
| 16 |
+
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
+
CMD ["python", "app.py"]
|