File size: 915 Bytes
e2aab5c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Utilisation d'une image Debian compatible avec Hugging Face
FROM python:3.9

# Mise à jour des paquets et installation de ODBC + dépendances
RUN apt-get update && apt-get install -y \
    curl \
    gnupg2 \
    unixodbc \
    unixodbc-dev \
    odbcinst \
    libpq-dev \
    && rm -rf /var/lib/apt/lists/*

# Installation du driver ODBC pour Microsoft SQL Server
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
    curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
    apt-get update && \
    ACCEPT_EULA=Y apt-get install -y msodbcsql17

# Création d'un environnement virtuel
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copie du projet
COPY . .

# Commande pour lancer Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]