mattn01 commited on
Commit
9169e0c
·
verified ·
1 Parent(s): 9ae496e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python as the base image
2
+ FROM python:3.10
3
+
4
+ # Install dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ curl \
7
+ unixodbc \
8
+ unixodbc-dev \
9
+ apt-transport-https \
10
+ gnupg
11
+
12
+ # Add Microsoft repository and install ODBC Driver 17
13
+ RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
14
+ RUN echo "deb [arch=amd64] https://packages.microsoft.com/debian/11/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list
15
+ RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17
16
+
17
+ # Set working directory
18
+ WORKDIR /home/user/app
19
+
20
+ # Install Python dependencies
21
+ COPY requirements.txt .
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy application code
25
+ COPY . .
26
+
27
+ # Run the Streamlit app
28
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]