|
|
|
|
|
|
|
|
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
ENV CUDA_HOME=/usr/local/cuda |
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
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 . . |
|
|
|
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |