Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +18 -12
Dockerfile
CHANGED
|
@@ -1,12 +1,18 @@
|
|
| 1 |
-
FROM python:3.10
|
| 2 |
-
|
| 3 |
-
WORKDIR /code
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /code
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y git
|
| 6 |
+
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
+
RUN pip install --upgrade pip
|
| 10 |
+
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu
|
| 11 |
+
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
+
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"]
|