yolo-coder / Dockerfile
erdemozkan's picture
Update Dockerfile
653f5a5 verified
raw
history blame contribute delete
766 Bytes
# Use Alpine Linux to natively support the 'musl' wheel that pip is grabbing
FROM python:3.10-alpine
# Install system dependencies Alpine needs for C++ and model downloading
RUN apk add --no-cache \
libstdc++ \
g++ \
make \
cmake \
curl \
linux-headers \
git
# Set up the HF user (Required)
RUN adduser -D -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# This will now pull the musl wheel and ACTUALLY run it
RUN pip install --no-cache-dir \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
llama-cpp-python==0.2.90 gradio huggingface_hub
# Copy your files
COPY --chown=user . $HOME/app
# Port 7860 is mandatory for HF Docker
CMD ["python", "app.py"]