Download Dockerfile from Sench729/EventHub: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/spaces/Sench729/EventHub/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sench729/EventHub/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sench729/EventHub/resolve/main/Dockerfile
648 Bytes
| # Use official Python image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements first for caching | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # Expose port (Render uses 10000+ dynamic ports, we'll override with CMD) | |
| EXPOSE 7860 | |
| # Redirect local storage and cache to /tmp | |
| ENV HOME=/tmp | |
| ENV XDG_DATA_HOME=/tmp/.local/share | |
| # Command to run the FastAPI server | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |