Download Dockerfile from danicor/server2: direct link, hf CLI and curl.
- Browser
- Download file 499 Bytes
-
https://huggingface.co/spaces/danicor/server2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/danicor/server2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/danicor/server2/resolve/main/Dockerfile
499 Bytes
| # استفاده از Python پایه | |
| FROM python:3.10-slim | |
| # جلوگیری از cache pip | |
| ENV PIP_NO_CACHE_DIR=1 | |
| # نصب نیازمندیها | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # کپی کد پروژه | |
| COPY . . | |
| # تنظیم متغیرهای محیطی (میتونی هم از Spaces Secrets استفاده کنی) | |
| ENV PORT=7860 | |
| # اجرا با uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |