Chat-w-git-Llama2 / Dockerfile
thewise's picture
Update Dockerfile
ea90fb2 verified
raw
history blame
1.09 kB
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
WORKDIR $HOME/app
# Create github_repo directory and ensure it's owned by `user`
RUN mkdir -p $HOME/app/github_repo
# Ensure the Dockerfile has the appropriate steps before this to set up git if needed
# For example, setting up git config or credentials if the repository is private
# Clone the repository into the created github_repo directory
# You might need to adjust the permissions or use git through SSH keys depending on your setup
# RUN git clone <repository-URL> $HOME/app/github_repo/
# Copy application files
COPY --chown=user requirements.txt $HOME/app/
COPY --chown=user app.py $HOME/app/
COPY --chown=user ./src/ $HOME/app/src/
# Install dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# The service runs on port 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]