Alif-1.0-8B-Instruct / Dockerfile
alishafique's picture
Update Dockerfile
10a1fa4 verified
raw
history blame contribute delete
928 Bytes
FROM python:3.10
# We need to set the host to 0.0.0.0 to allow outside access
ENV HOST 0.0.0.0
# Install dependencies
RUN python3 -m pip install --upgrade pip pytest cmake \
scikit-build setuptools fastapi uvicorn sse-starlette \
pydantic-settings starlette-context gradio huggingface_hub hf_transfer
# Install llama-cpp-python for CPU
RUN python3 -m pip install llama-cpp-python
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONPATH=$HOME/app \
PYTHONUNBUFFERED=1 \
GRADIO_ALLOW_FLAGGING=never \
GRADIO_NUM_PORTS=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_THEME=huggingface \
SYSTEM=spaces
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
CMD ["python3", "app.py"]