PARTHASAKHAPAUL commited on
Commit
b2d9fc7
·
1 Parent(s): 2b44e69

added docker

Browse files
Files changed (2) hide show
  1. Project/.gitignore +1 -1
  2. Project/Dockerfile +29 -0
Project/.gitignore CHANGED
@@ -2,7 +2,7 @@ myenv
2
  .env
3
  key_stats.json
4
  tests.py
5
- Dockerfile
6
  run.py
7
  tests.py
8
  __pycache__/
 
2
  .env
3
  key_stats.json
4
  tests.py
5
+ # Dockerfile
6
  run.py
7
  tests.py
8
  __pycache__/
Project/Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -------- Base image --------
2
+ FROM python:3.11-slim
3
+
4
+ # -------- System deps --------
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # -------- Working dir --------
10
+ WORKDIR /app
11
+
12
+ # -------- Copy dependencies --------
13
+ COPY requirements.txt .
14
+
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # -------- Copy project code --------
18
+ COPY . .
19
+
20
+ # -------- Streamlit settings --------
21
+ ENV STREAMLIT_SERVER_PORT=8501
22
+ ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
23
+ ENV PYTHONUNBUFFERED=1
24
+
25
+ # -------- Expose port --------
26
+ EXPOSE 8501
27
+
28
+ # -------- Run app --------
29
+ CMD ["streamlit", "run", "main.py"]