Cyber_Bot / Dockerfile
KoKoDanio's picture
Update Dockerfile
c929efe verified
# Use a base image with Python
# Use a CUDA devel image as the base
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
# Install git and other build tools
# The specific command depends on the base image's package manager.
# For Debian/Ubuntu-based images like python:3.10-slim, it's apt-get.
RUN apt-get update && apt-get install -y python3 python3-pip git
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip
# Set the working directory in the container
ENV CUDA_HOME=/usr/local/cuda
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install torch==2.1.0
RUN pip install --no-cache-dir --upgrade setuptools wheel
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application code
COPY . .
# Expose the port your application will run on
EXPOSE 7860
# Command to run your application using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]