Spaces:
Sleeping
Sleeping
Download Dockerfile from Caner7/pegos-data: direct link, hf CLI and curl.
- Browser
- Download file 734 Bytes
-
https://huggingface.co/spaces/Caner7/pegos-data/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Caner7/pegos-data/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Caner7/pegos-data/resolve/main/Dockerfile
734 Bytes
| # ===================================================== | |
| # Dockerfile — Pegos Data API (FastAPI + HF Spaces) | |
| # ===================================================== | |
| FROM python:3.10-slim | |
| # Sistem güncellemeleri ve bağımlılıklar | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Uygulama dizini | |
| WORKDIR /app | |
| # Python bağımlılıklarını yükle | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Uygulama dosyalarını kopyala | |
| COPY . . | |
| # Hugging Face Spaces uyumlu dinamik port | |
| ENV PORT=7860 | |
| EXPOSE $PORT | |
| # Non-root kullanıcı | |
| RUN useradd -m user | |
| USER user | |
| # FastAPI sunucusunu başlat | |
| CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port $PORT"] |