| FROM python:3.9-slim |
| RUN apt update |
| RUN apt install -y git |
| RUN git clone https: |
| WORKDIR "app" |
| RUN sed -i 's|port=8002|port=8001|g' ./api/main.py &&\ |
| sed -i '/@app.options("\/v1\/chat\/completions")/a@app.options("/hf/v1/chat/completions")' ./api/main.py &&\ |
| sed -i '/@app.post("\/v1\/chat\/completions")/a@app.post("/hf/v1/chat/completions")' ./api/main.py |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| EXPOSE 8001 |
|
|
| #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"] |
| CMD ["python", "./api/main.py", "--host", "0.0.0.0:8001"] |