Spaces:
Sleeping
Sleeping
Download Dockerfile from aniket9909/tenderapi: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/spaces/aniket9909/tenderapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aniket9909/tenderapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aniket9909/tenderapi/resolve/main/Dockerfile
802 Bytes
| # Use a small Python image | |
| FROM python:3.10-slim | |
| # Prevents Python from writing .pyc files and buffers logs (better for containers) | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Create app directory | |
| WORKDIR /home/user/app | |
| # System deps (optional: add build tools if you need them) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy and install Python deps | |
| COPY requirements.txt /home/user/app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your app code | |
| COPY . /home/user/app | |
| # Expose the port Hugging Face expects | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| # Run the FastAPI app | |
| # NOTE: app:app -> <module>:<FastAPI instance name> | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |