File size: 513 Bytes
4e8ce7c
871df78
 
4b08b82
871df78
 
 
4b08b82
 
aa9f0d4
afc1b20
aa9f0d4
4b08b82
 
 
4c34230
4b08b82
aa9f0d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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