cyber-ner / Dockerfile
yairgalili's picture
streamlit
e1177f7
raw
history blame contribute delete
689 Bytes
# Use an official lightweight Python image
FROM python:3.13-slim
# Set working directory inside the container
WORKDIR /app
# Copy requirements first to leverage Docker layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY *.py .
ENV PYTHONUNBUFFERED=1 \
PORT=8501 \
HF_HOME=/home/user/huggingface
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
EXPOSE 8501
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]