FROM python:3.10 RUN apt-get update && \ apt-get install -y \ build-essential \ libssl-dev \ libffi-dev \ libbz2-dev \ liblzma-dev \ zlib1g-dev \ libsqlite3-dev \ wget \ curl \ git \ cmake \ libblis64-4 \ libblis64-4-openmp \ libblis64-4-pthread \ libblis64-4-serial \ libblis64-dev \ libblis64-openmp-dev \ libblis64-pthread-dev \ libblis64-serial-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" ENV GOMP_CPU_AFFINITY="0-19" ENV BLIS_NUM_THREADS=14 WORKDIR /app RUN pip install --no-cache-dir --upgrade pip RUN pip install --no-cache-dir --upgrade gradio RUN CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=FLAME" \ pip install --no-cache-dir --upgrade llama-cpp-python COPY --chown=user ./app.py /app/app.py CMD ["python", "app.py"]