Spaces:
Running
Running
dboa9 commited on
Commit ·
6f54e9a
1
Parent(s): 58dfc64
Minimal Dockerfile - only app.py needed, rebuild v5
Browse files- Dockerfile +8 -19
Dockerfile
CHANGED
|
@@ -1,29 +1,18 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
|
| 6 |
-
# Install minimal system dependencies
|
| 7 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
-
curl \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
-
|
| 11 |
-
# Setup User
|
| 12 |
-
RUN useradd -m -u 1000 appuser
|
| 13 |
-
USER appuser
|
| 14 |
-
ENV PATH="/home/appuser/.local/bin:$PATH"
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
-
# Install
|
| 18 |
-
COPY
|
| 19 |
-
RUN pip install --no-cache-dir
|
| 20 |
|
| 21 |
-
# Copy
|
| 22 |
-
COPY
|
| 23 |
-
COPY --chown=appuser start.sh .
|
| 24 |
|
| 25 |
-
# Expose Port
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
-
# Run
|
| 29 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# REBUILD TRIGGER: 2026-02-03-v5-final
|
| 4 |
+
# This comment forces Docker cache invalidation
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# Install dependencies first (cached unless requirements change)
|
| 9 |
+
COPY requirements.txt .
|
| 10 |
+
RUN pip install --no-cache-dir fastapi uvicorn pydantic
|
| 11 |
|
| 12 |
+
# Copy only the app - nothing else needed
|
| 13 |
+
COPY app.py .
|
|
|
|
| 14 |
|
|
|
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
+
# Run uvicorn directly - simple and reliable
|
| 18 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|