Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- Dockerfile +13 -0
- requirements.txt +5 -0
Dockerfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dockerfile
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
WORKDIR /code
|
| 5 |
+
|
| 6 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
+
|
| 9 |
+
COPY . /code/
|
| 10 |
+
|
| 11 |
+
# Use gunicorn to run the app. It will look for the 'app' instance in the 'app.py' file.
|
| 12 |
+
# We bind it to 0.0.0.0:7860, which is the port Hugging Face Spaces expects.
|
| 13 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
flask
|
| 2 |
+
torch
|
| 3 |
+
torchvision
|
| 4 |
+
Pillow
|
| 5 |
+
gunicorn
|