Spaces:
Sleeping
Sleeping
Delete Dockerfile
Browse files- Dockerfile +0 -33
Dockerfile
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
FROM python:3.11-slim
|
| 2 |
-
|
| 3 |
-
WORKDIR /app
|
| 4 |
-
|
| 5 |
-
# Environment configuration
|
| 6 |
-
ENV ENABLE_WEB_INTERFACE=true
|
| 7 |
-
|
| 8 |
-
# Create non-root user for security
|
| 9 |
-
RUN adduser --disabled-password --gecos '' nonroot
|
| 10 |
-
|
| 11 |
-
# Install uv (fast Python package manager)
|
| 12 |
-
RUN pip install --no-cache-dir uv
|
| 13 |
-
|
| 14 |
-
# Copy dependencies first (cache layer)
|
| 15 |
-
COPY requirements.txt .
|
| 16 |
-
RUN uv pip install --system --no-cache -r requirements.txt
|
| 17 |
-
|
| 18 |
-
# Copy application code
|
| 19 |
-
COPY . .
|
| 20 |
-
|
| 21 |
-
# Set ownership and switch to non-root user
|
| 22 |
-
RUN chown -R nonroot:nonroot /app
|
| 23 |
-
USER nonroot
|
| 24 |
-
|
| 25 |
-
# Expose the port
|
| 26 |
-
EXPOSE 7860
|
| 27 |
-
|
| 28 |
-
# Health check
|
| 29 |
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
| 30 |
-
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1
|
| 31 |
-
|
| 32 |
-
# Start the server using uv run
|
| 33 |
-
CMD ["uv", "run", "python", "-m", "server.main"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|