|
|
|
FROM python:3.10-slim |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
WORKDIR /home/user/app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y --no-install-recommends git git-lfs ffmpeg libsm6 libxext6 libgl1-mesa-glx && \ |
|
rm -rf /var/lib/apt/lists/* && \ |
|
git lfs install |
|
|
|
|
|
RUN pip install --no-cache-dir pip setuptools |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
EXPOSE 8080 8501 |
|
|
|
|
|
CMD if [ "$USE_STREAMLIT" = "1" ]; then \ |
|
streamlit run app.py --server.port=8501 --server.enableCORS=false; \ |
|
else \ |
|
python app.py; \ |
|
fi |
|
|