Spaces:
Runtime error
Runtime error
Download Dockerfile from Pujan-Dev/testing_fastapi_with_mongodb: direct link, hf CLI and curl.
- Browser
- Download file 446 Bytes
-
https://huggingface.co/spaces/Pujan-Dev/testing_fastapi_with_mongodb/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Pujan-Dev/testing_fastapi_with_mongodb/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Pujan-Dev/testing_fastapi_with_mongodb/resolve/main/Dockerfile
446 Bytes
| # Use official Python image | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy your app files | |
| COPY ./app.py ./app.py | |
| COPY ./db.py ./db.py | |
| COPY ./requirements.txt ./requirements.txt | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose port (Hugging Face Spaces uses 7860 or 8000) | |
| EXPOSE 8000 | |
| # Command to run the app with uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |