FROM nvidia/cuda:11.8.0-base-ubuntu22.04 # Install system dependencies RUN apt-get update && apt-get install -y \ python3-pip \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ libgl1-mesa-glx # Set the working directory in the container WORKDIR /code # Copy the requirements file COPY ./requirements.txt /code/requirements.txt # Install Python dependencies RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy the FastAPI app into the container COPY ./app /code/app # Command to run the FastAPI app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]