Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Base image with CUDA and Python
|
2 |
+
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
|
3 |
+
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
git python3 python3-pip libgl1-mesa-glx && \
|
6 |
+
ln -s /usr/bin/python3 /usr/bin/python
|
7 |
+
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
COPY requirements.txt .
|
11 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
12 |
+
|
13 |
+
COPY . /app
|
14 |
+
|
15 |
+
# Install ai-toolkit
|
16 |
+
RUN git clone https://github.com/ostris/ai-toolkit && \
|
17 |
+
cd ai-toolkit && git submodule update --init --recursive && \
|
18 |
+
pip install -r requirements.txt
|
19 |
+
|
20 |
+
# Run FastAPI app
|
21 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|