Download Dockerfile from Sahaltech/AI-API: direct link, hf CLI and curl.
- Browser
- Download file 869 Bytes
-
https://huggingface.co/spaces/Sahaltech/AI-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sahaltech/AI-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sahaltech/AI-API/resolve/main/Dockerfile
869 Bytes
| FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime | |
| WORKDIR /app | |
| ENV PYTHONUNBUFFERED=1 \ | |
| HF_HOME=/tmp/huggingface \ | |
| TRANSFORMERS_CACHE=/tmp/huggingface/transformers \ | |
| HF_DATASETS_CACHE=/tmp/huggingface/datasets \ | |
| NVIDIA_VISIBLE_DEVICES=all \ | |
| NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| ffmpeg \ | |
| openjdk-17-jre-headless \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY . . | |
| RUN pip install --no-cache-dir --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |
| CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |
| # docker buildx build --platform linux/amd64 --no-cache -t ai-api . | |
| # docker tag ai-api kora3/ai-api:latest | |
| # docker push kora3/ai-api:latest | |