Spaces:
Sleeping
Sleeping
| # 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"] | |