Chat-w-git-Llama2 / Dockerfile
thewise's picture
Update Dockerfile
dabd9af verified
raw
history blame
827 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y build-essential curl git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Create non-root user
RUN useradd -m -u 1000 user
# Create Github directory
RUN mkdir ./github_repo && chown user:user ./github_repo
# Switch to the non-root user
USER user
# Update PATH to ensure local bin is included
ENV PATH=/home/user/.local/bin:$PATH
# Copy application files as the non-root user to avoid permission issues
COPY --chown=user:user . /app
# Install dependencies
RUN pip install --upgrade pip && pip install --user -r requirements.txt
#EXPOSE 8501
#I commented out EXPOSE 8501, and gave 7860 in CMD, since it works. Funny? The building of Streamlit never stops with 8501!!!
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]