Spaces:
Running
Running
| FROM python:3.10-slim | |
| RUN useradd -m -u 1000 user | |
| RUN apt-get update && apt-get install -y \ | |
| pkg-config gcc g++ cmake build-essential libopenblas-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| ENV CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS" | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user ./app.py app.py | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |