Spaces:
Runtime error
Runtime error
Commit
·
70e81e1
1
Parent(s):
b35e1fb
fix requirmens and docker
Browse files- Dockerfile +6 -3
- requirements.txt +3 -2
Dockerfile
CHANGED
@@ -4,9 +4,12 @@ WORKDIR /app
|
|
4 |
|
5 |
COPY . /app
|
6 |
|
7 |
-
# Instala dependências otimizadas
|
8 |
-
RUN
|
9 |
-
|
|
|
|
|
|
|
10 |
|
11 |
# Define o comando de execução
|
12 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
4 |
|
5 |
COPY . /app
|
6 |
|
7 |
+
# Instala dependências otimizadas, incluindo sentencepiece
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
build-essential \
|
10 |
+
libssl-dev \
|
11 |
+
&& pip install --no-cache-dir -r requirements.txt \
|
12 |
+
&& pip install --no-cache-dir transformers accelerate sentencepiece
|
13 |
|
14 |
# Define o comando de execução
|
15 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
fastapi==0.103.2
|
2 |
uvicorn==0.23.2
|
3 |
-
transformers==4.
|
4 |
accelerate==0.21.0
|
5 |
-
huggingface_hub
|
|
|
|
1 |
fastapi==0.103.2
|
2 |
uvicorn==0.23.2
|
3 |
+
transformers==4.45.0
|
4 |
accelerate==0.21.0
|
5 |
+
huggingface_hub
|
6 |
+
sentencepiece # Adicionada para suportar o tokenizer do PTT5
|