Download Dockerfile from 8e/you2api: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/spaces/8e/you2api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/8e/you2api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/8e/you2api/resolve/main/Dockerfile
513 Bytes
| FROM python:3.11-alpine | |
| RUN apk update && \ | |
| apk add --no-cache tzdata git && \ | |
| cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ | |
| echo "Asia/Shanghai" > /etc/timezone | |
| RUN git clone https://github.com/len-ni/Youcom_api && \ | |
| cd Youcom_api && \ | |
| sed -i "s/debug=True, port=50600/host='0.0.0.0', port=7860/g" api.py && \ | |
| sed -i "s/\/v1\/chat\/completions/\/hf\/v1\/chat\/completions/g" api.py && \ | |
| pip install -r requirements.txt | |
| WORKDIR /Youcom_api | |
| EXPOSE 7860 | |
| CMD python api.py |