Spaces:
Sleeping
Sleeping
# 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"] | |