yagpt / Dockerfile
kopilk's picture
Update Dockerfile
7300ca2 verified
raw
history blame contribute delete
887 Bytes
FROM python:3.11-slim
# Installation de curl et Ollama
RUN apt-get update && apt-get install -y curl && \
curl -fsSL https://ollama.ai/install.sh | sh && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
RUN useradd -m -u 1000 user
# Install depencencies
RUN python3 -m pip install --upgrade pip \
ollama \
langchain \
langchain_community \
langchain-ollama \
ollama \
gradio \
bs4
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
WORKDIR $HOME/app
RUN chmod +x start.sh
# Exposition des ports nécessaires (7860 GRadio)
EXPOSE 7860 11434
#EXPOSE 7861 7862 7863 7864 7865
# Commande de démarrage
CMD ["./start.sh"]