luck210 commited on
Commit
ed0dfae
·
verified ·
1 Parent(s): ea2b939

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -24
Dockerfile CHANGED
@@ -1,27 +1,6 @@
1
- # Utiliser une image Ubuntu
2
- FROM ubuntu:22.04
3
-
4
- # Installer les dépendances de base
5
- RUN apt update && apt install -y curl python3 python3-pip
6
-
7
- # Installer Ollama
8
- RUN curl -fsSL https://ollama.com/install.sh | sh
9
-
10
- # Installer FastAPI et dépendances
11
- RUN pip3 install fastapi uvicorn pydantic requests
12
-
13
- # Copier le script d’entrée et le code FastAPI
14
- COPY entrypoint.sh /app/entrypoint.sh
15
  COPY app.py /app/app.py
16
-
17
- # Définir le dossier de travail
18
  WORKDIR /app
19
-
20
- # Rendre le script exécutable
21
- RUN chmod +x /app/entrypoint.sh
22
-
23
- # Exposer le port pour Hugging Face Spaces
24
  EXPOSE 7860
25
-
26
- # Utiliser le script comme point d’entrée
27
- ENTRYPOINT ["/app/entrypoint.sh"]
 
1
+ FROM python:3.9-slim
2
+ RUN pip install fastapi uvicorn pydantic requests transformers torch python-multipart
 
 
 
 
 
 
 
 
 
 
 
 
3
  COPY app.py /app/app.py
 
 
4
  WORKDIR /app
 
 
 
 
 
5
  EXPOSE 7860
6
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]