File size: 669 Bytes
5fbdf8d
 
 
 
 
 
 
5a97006
 
5fbdf8d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Base image with CUDA and Python
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04

RUN apt-get update && apt-get install -y \
    git python3 python3-pip libgl1-mesa-glx && \
    ln -s /usr/bin/python3 /usr/bin/python

RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache

WORKDIR /app

COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

COPY . /app

# Install ai-toolkit
RUN git clone https://github.com/ostris/ai-toolkit && \
    cd ai-toolkit && git submodule update --init --recursive && \
    pip install -r requirements.txt

# Run FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]