# Use the official Python image from the Docker Hub FROM python:3.10 # Set the working directory in the container WORKDIR /home/user/app # Install system dependencies RUN apt-get update && apt-get install -y \ git \ git-lfs \ ffmpeg \ libsm6 \ libxext6 \ cmake \ rsync \ libgl1-mesa-glx \ && rm -rf /var/lib/apt/lists/* \ && git lfs install # Install specific versions of pip and Python packages RUN pip install --no-cache-dir pip==22.3.1 && \ pip install --no-cache-dir \ datasets \ "huggingface-hub>=0.19" \ "hf-transfer>=0.1.4" \ "protobuf<4" \ "click<8.1" \ "pydantic~=2.8" # Copy requirements file and install Python dependencies COPY --chown=1000:1000 requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt # Copy the rest of the application code COPY --chown=1000:1000 . /home/user/app