Aidahaouas commited on
Commit
e2aab5c
·
verified ·
1 Parent(s): e62749c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Utilisation d'une image Debian compatible avec Hugging Face
2
+ FROM python:3.9
3
+
4
+ # Mise à jour des paquets et installation de ODBC + dépendances
5
+ RUN apt-get update && apt-get install -y \
6
+ curl \
7
+ gnupg2 \
8
+ unixodbc \
9
+ unixodbc-dev \
10
+ odbcinst \
11
+ libpq-dev \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Installation du driver ODBC pour Microsoft SQL Server
15
+ RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
16
+ curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
17
+ apt-get update && \
18
+ ACCEPT_EULA=Y apt-get install -y msodbcsql17
19
+
20
+ # Création d'un environnement virtuel
21
+ WORKDIR /app
22
+ COPY requirements.txt .
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copie du projet
26
+ COPY . .
27
+
28
+ # Commande pour lancer Streamlit
29
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]