Download Dockerfile from Yuuki0125/AI_API: direct link, hf CLI and curl.
- Browser
- Download file 510 Bytes
-
https://huggingface.co/spaces/Yuuki0125/AI_API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Yuuki0125/AI_API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Yuuki0125/AI_API/resolve/main/Dockerfile
510 Bytes
| FROM python:3.10.9 | |
| WORKDIR /code | |
| ENV TRANSFORMERS_CACHE=/tmp/cache/huggingface | |
| ENV HF_HOME=/tmp/huggingface-cache | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN mkdir -p /tmp/cache/huggingface && chmod -R 777 /tmp/cache/huggingface | |
| RUN mkdir -p /tmp/huggingface-cache && chmod -R 777 /tmp/huggingface-cache | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade g4f[all] | |
| COPY . . | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |