Update Dockerfile
Browse files- Dockerfile +10 -9
Dockerfile
CHANGED
@@ -2,25 +2,26 @@
|
|
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
|
11 |
-
RUN
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
-
|
16 |
-
# Copier le code de l’API dans le conteneur
|
17 |
COPY app.py /app/app.py
|
18 |
|
19 |
# Définir le dossier de travail
|
20 |
WORKDIR /app
|
21 |
|
|
|
|
|
|
|
22 |
# Exposer le port pour Hugging Face Spaces
|
23 |
EXPOSE 7860
|
24 |
|
25 |
-
#
|
26 |
-
|
|
|
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"]
|