FROM tensorflow/tensorflow:1.14.0-gpu-py3 # Copy requirements first for efficient caching COPY requirements.txt ./ RUN rm /etc/apt/sources.list.d/cuda.list RUN rm /etc/apt/sources.list.d/nvidia-ml.list # Update and install system dependencies RUN apt-get update -o Acquire::AllowInsecureRepositories=true \ && apt-get install -y libglib2.0-0 libgl1-mesa-glx ffmpeg \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Upgrade pip and install python packages RUN pip install --upgrade pip \ && pip install --upgrade pip setuptools wheel \ && pip install --no-cache-dir -r requirements.txt \ && pip install jupyter WORKDIR /app EXPOSE 7860 # Copy the rest of the files COPY . . RUN chmod -R 777 /app/ CMD ["streamlit", "run", "app.py", "--server.port", "7860"]