Spaces:
Build error
Build error
Create dockerfile
Browse files- dockerfile +18 -0
dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM nvidia/cuda:11.8.0-base-ubuntu22.04
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y python3 python3-pip git curl && rm -rf /var/lib/apt/lists/*
|
| 6 |
+
|
| 7 |
+
RUN pip3 install --no-cache-dir \
|
| 8 |
+
torch torchvision torchaudio \
|
| 9 |
+
transformers fastapi uvicorn accelerate bitsandbytes
|
| 10 |
+
|
| 11 |
+
COPY app.py /app/app.py
|
| 12 |
+
COPY requirements.txt /app/requirements.txt
|
| 13 |
+
|
| 14 |
+
ENV CUDA_VISIBLE_DEVICES=0
|
| 15 |
+
|
| 16 |
+
EXPOSE 8000
|
| 17 |
+
|
| 18 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|