Spaces:
Sleeping
Sleeping
gpu work
Browse files- Dockerfile +1 -2
- main.py +2 -0
- requirements.txt +3 -1
Dockerfile
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
FROM
|
2 |
-
#FROM python:3.9
|
3 |
|
4 |
# Using the Ubuntu image (our OS)
|
5 |
# Update package manager (apt-get)
|
|
|
1 |
+
FROM python:3.9
|
|
|
2 |
|
3 |
# Using the Ubuntu image (our OS)
|
4 |
# Update package manager (apt-get)
|
main.py
CHANGED
@@ -13,6 +13,8 @@ import torch
|
|
13 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
14 |
|
15 |
|
|
|
|
|
16 |
app = FastAPI()
|
17 |
|
18 |
@app.get("/generate")
|
|
|
13 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
14 |
|
15 |
|
16 |
+
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
17 |
+
|
18 |
app = FastAPI()
|
19 |
|
20 |
@app.get("/generate")
|
requirements.txt
CHANGED
@@ -3,4 +3,6 @@ requests==2.27.*
|
|
3 |
sentencepiece==0.1.*
|
4 |
torch==1.11.*
|
5 |
transformers==4.*
|
6 |
-
uvicorn[standard]==0.17.*
|
|
|
|
|
|
3 |
sentencepiece==0.1.*
|
4 |
torch==1.11.*
|
5 |
transformers==4.*
|
6 |
+
uvicorn[standard]==0.17.*
|
7 |
+
--extra-index-url https://download.pytorch.org/whl/cu113
|
8 |
+
torch
|