Spaces:
Runtime error
Runtime error
Download Dockerfile from AlekhyaC2005/CapstoneFastAPI: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/spaces/AlekhyaC2005/CapstoneFastAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AlekhyaC2005/CapstoneFastAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AlekhyaC2005/CapstoneFastAPI/resolve/main/Dockerfile
1.66 kB
| # ========================================================= | |
| # BASE IMAGE | |
| # ========================================================= | |
| FROM python:3.11-slim | |
| # ========================================================= | |
| # ENV VARIABLES | |
| # ========================================================= | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # ========================================================= | |
| # WORK DIRECTORY | |
| # ========================================================= | |
| WORKDIR /app | |
| # ========================================================= | |
| # INSTALL SYSTEM DEPENDENCIES | |
| # ========================================================= | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ========================================================= | |
| # COPY REQUIREMENTS | |
| # ========================================================= | |
| COPY requirements.txt . | |
| # ========================================================= | |
| # INSTALL PYTHON DEPENDENCIES | |
| # ========================================================= | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ========================================================= | |
| # COPY PROJECT FILES | |
| # ========================================================= | |
| COPY . . | |
| # ========================================================= | |
| # EXPOSE PORT | |
| # ========================================================= | |
| EXPOSE 7860 | |
| # ========================================================= | |
| # START FASTAPI | |
| # ========================================================= | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |