Spaces:
Sleeping
Sleeping
Commit
·
2fb4c2e
1
Parent(s):
89c88e1
HF Space: Docker FastAPI inference
Browse files- Dockerfile +7 -2
- requirements.txt +3 -0
Dockerfile
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
FROM python:3.11-slim
|
|
|
2 |
WORKDIR /app
|
|
|
|
|
3 |
COPY requirements.txt .
|
4 |
-
RUN pip install -r requirements.txt
|
|
|
5 |
COPY . .
|
6 |
-
|
|
|
|
1 |
FROM python:3.11-slim
|
2 |
+
|
3 |
WORKDIR /app
|
4 |
+
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
5 |
+
|
6 |
COPY requirements.txt .
|
7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
+
|
9 |
COPY . .
|
10 |
+
EXPOSE 7860
|
11 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -2,3 +2,6 @@ fastapi
|
|
2 |
uvicorn[standard]
|
3 |
transformers
|
4 |
torch
|
|
|
|
|
|
|
|
2 |
uvicorn[standard]
|
3 |
transformers
|
4 |
torch
|
5 |
+
sentencepiece>=0.1.99
|
6 |
+
tokenizers>=0.15
|
7 |
+
protobuf>=4.25
|