habulaj commited on
Commit
5c5d3e4
verified
1 Parent(s): 3cdeaa7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -1,16 +1,24 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
  FROM python:3.9
5
 
 
6
  RUN useradd -m -u 1000 user
7
  USER user
8
  ENV PATH="/home/user/.local/bin:$PATH"
9
 
 
10
  WORKDIR /app
11
 
 
12
  COPY --chown=user ./requirements.txt requirements.txt
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
 
 
 
 
 
15
  COPY --chown=user . /app
 
 
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Usa a imagem base do Python 3.9
 
 
2
  FROM python:3.9
3
 
4
+ # Cria o usu谩rio "user" para rodar o app
5
  RUN useradd -m -u 1000 user
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
8
 
9
+ # Define o diret贸rio de trabalho no cont锚iner
10
  WORKDIR /app
11
 
12
+ # Copia o arquivo requirements.txt e instala as depend锚ncias
13
  COPY --chown=user ./requirements.txt requirements.txt
14
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
 
16
+ # Instala o spaCy e o modelo "en_core_web_sm"
17
+ RUN pip install spacy && \
18
+ python -m spacy download en_core_web_sm
19
+
20
+ # Copia o c贸digo do app
21
  COPY --chown=user . /app
22
+
23
+ # Inicia o servidor FastAPI
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]