FROM python:3.9-slim ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app COPY requirements.txt packages.txt ./ RUN apt-get update && \ xargs -a packages.txt apt-get install -y && \ apt-get install -y libgomp1 && \ rm -rf /var/lib/apt/lists/* && \ python -m venv /opt/venv && \ . /opt/venv/bin/activate && \ pip install --no-cache-dir -U pip setuptools wheel && \ pip install --no-cache-dir -r requirements.txt && \ python -m spacy download en_core_web_sm && \ python -m spacy validate ENV PATH="/opt/venv/bin:$PATH" COPY . . EXPOSE 8501 CMD ["streamlit", "run", "presidio_streamlit.py", "--server.port=8501", "--server.address=0.0.0.0"]