LLM-34B-GGUF-Chat-V3 / Dockerfile
chenhaodev's picture
Update Dockerfile
7cbdbbe verified
raw
history blame
No virus
1.04 kB
# Use an alias for the base image for easier updates
FROM python:3.10 as base
# Set model
ENV MODEL=gguf/Smaug-34B-v0.1-GGUF
ENV QUANT=Q2_K
ENV CHAT_TEMPLATE=chatml
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Install Python requirements
COPY ./requirements.txt $HOME/app/
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Download model
RUN MODEL_NAME_FILE=$(echo ${MODEL#*/} | tr '[:upper:]' '[:lower:]' | sed 's/-gguf$//') && \
#wget https://huggingface.co/gguf/Smaug-34B-v0.1-GGUF/resolve/main/smaug-34b-v0.1.Q4_K_M.gguf -O model.gguf
wget https://huggingface.co/gguf/Smaug-34B-v0.1-GGUF/resolve/main/smaug-34b-v0.1.Q2_K.gguf -O model.gguf
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
# Command to run the application
CMD ["python", "app.py"]