Tour_Generator_GA / Dockerfile
GaetanoParente's picture
fix CORS per Streamlit
fae36f1
raw
history blame contribute delete
542 Bytes
FROM python:3.10-slim
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH" \
PYTHONUNBUFFERED=1
WORKDIR /home/user/app
COPY --chown=user:user requirements.txt /home/user/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user:user . /home/user/app/
EXPOSE 7860
# protezioni CORS e XSRF disabilitate per Streamlit
CMD bash -c "python app.py & sleep 3 && streamlit run streamlit_ui.py --server.port 7860 --server.address 0.0.0.0 --server.enableCORS false --server.enableXsrfProtection false"