Team Ai
Apppublic

mattn01/Excel_SQL_Processor

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1# Use Python as the base image2FROM python:3.103 4# Install system dependencies5RUN apt-get update && apt-get install -y \6    curl \7    unixodbc \8    unixodbc-dev \9    apt-transport-https \10    gnupg \11    libodbc1 \12    odbcinst \13    libodbc214 15# Add Microsoft repository and install ODBC Driver 1816RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc17RUN echo "deb [arch=amd64] https://packages.microsoft.com/debian/11/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list18RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql1819 20# Manually create a symbolic link to fix libodbc.so.2 missing error21RUN ln -s /usr/lib/x86_64-linux-gnu/libodbc.so /usr/lib/x86_64-linux-gnu/libodbc.so.222 23# Verify ODBC installation24RUN ls -l /usr/lib/x86_64-linux-gnu/ | grep odbc25RUN odbcinst -q -d26 27# Set working directory28WORKDIR /home/user/app29 30# Install Python dependencies31COPY requirements.txt .32RUN pip install --no-cache-dir -r requirements.txt33 34# Force reinstall pyodbc inside the container35RUN pip uninstall -y pyodbc && pip install --no-cache-dir pyodbc36 37# Copy application code38COPY . .39 40# Run the Streamlit app41CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]42