Chat-w-git-Llama2 / Dockerfile
thewise's picture
Update Dockerfile
f1e9cd6 verified
raw
history blame
668 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
# Switch to the non-root user earlier if needed
USER user
# Copy application files as the non-root user to avoid permission issues
COPY --chown=user:user . /app
# Update PATH to ensure local bin is included
ENV PATH=/home/user/.local/bin:$PATH
# Install dependencies, ensuring the streamlit executable is in PATH
RUN pip install --upgrade pip && pip install --user -r requirements.txt
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]