function-expert / Dockerfile
mangoman7002's picture
Update Dockerfile
89c1619 verified
raw
history blame contribute delete
546 Bytes
FROM python:3.10
WORKDIR /code
RUN pip install --no-cache-dir --upgrade llama-cpp-python llama-cpp-python[server]
RUN apt update
RUN apt install wget
RUN apt install -y protobuf-compiler libprotobuf-dev
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
RUN wget 'https://huggingface.co/afrideva/Qwen2-0.5B-GGUF/resolve/main/qwen2-0.5b.Q2_K.gguf'
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]