Spaces:
No application file
No application file
new chages applied
Browse files- dockerfile +4 -2
- requirements.txt +2 -1
dockerfile
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
-
FROM python:3.10
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
COPY requirements.txt .
|
|
|
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
-
|
| 8 |
COPY . .
|
| 9 |
|
|
|
|
|
|
|
| 10 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
COPY requirements.txt .
|
| 6 |
+
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
+
EXPOSE 7860
|
| 11 |
+
|
| 12 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
fastapi
|
| 2 |
uvicorn[standard]
|
| 3 |
transformers
|
| 4 |
-
torch
|
|
|
|
|
|
| 1 |
fastapi
|
| 2 |
uvicorn[standard]
|
| 3 |
transformers
|
| 4 |
+
torch
|
| 5 |
+
pydantic
|