Chat-w-git-Llama2 / Dockerfile
thewise's picture
Update Dockerfile
ba4db7e verified
raw
history blame
707 Bytes
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
# 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"]