| # Use an official CUDA runtime as a parent image | |
| FROM nvidia/cuda:11.2.2-runtime-ubuntu20.04 | |
| # Set the working directory in the container | |
| WORKDIR /usr/src/app | |
| # Install Python | |
| RUN apt-get update && apt-get install -y python3.8 python3-pip | |
| # Copy the current directory contents into the container at /usr/src/app | |
| COPY . /usr/src/app | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Make port 80 available to the world outside this container | |
| EXPOSE 7860 | |
| # Run app.py when the container launches | |
| CMD ["python3", "app.py"] | |