Arif commited on
Commit
39bf6ca
·
1 Parent(s): d112890

Updated for docker running

Browse files
backend/Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy requirements
6
+ COPY backend/requirements.txt .
7
+
8
+ # Install dependencies using uv
9
+ RUN pip install uv && uv pip install --system -r requirements.txt
10
+
11
+ # Copy backend code
12
+ COPY backend ./
13
+
14
+ # Expose port
15
+ EXPOSE 8000
16
+
17
+ # Run backend
18
+ CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
backend/requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ fastapi==0.104.1
2
+ uvicorn==0.24.0
3
+ pandas==2.1.3
4
+ numpy>=1.26.0,<2.0
5
+ python-multipart==0.0.6
6
+ pydantic==2.5.0
7
+ pydantic-settings==2.1.0
8
+ python-dotenv==1.0.0
9
+ aiofiles==23.2.1
docker-compose.yml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ backend:
3
+ build:
4
+ context: .
5
+ dockerfile: backend/Dockerfile
6
+ ports:
7
+ - "8000:8000"
8
+ environment:
9
+ - PYTHONUNBUFFERED=1
10
+ volumes:
11
+ - ./backend:/app
12
+ networks:
13
+ - llm-network
14
+
15
+ frontend:
16
+ build:
17
+ context: .
18
+ dockerfile: frontend/Dockerfile
19
+ ports:
20
+ - "8501:8501"
21
+ environment:
22
+ - PYTHONUNBUFFERED=1
23
+ depends_on:
24
+ - backend
25
+ volumes:
26
+ - ./frontend:/app
27
+ networks:
28
+ - llm-network
29
+
30
+ networks:
31
+ llm-network:
32
+ driver: bridge
frontend/.streamlit/config.toml CHANGED
@@ -5,9 +5,14 @@ secondaryBackgroundColor = "#e0e0e0"
5
  textColor = "#262730"
6
  font = "sans serif"
7
 
8
- [client]
9
- showErrorDetails = true
10
-
11
  [server]
12
  port = 8501
13
- headless = false
 
 
 
 
 
 
 
 
 
5
  textColor = "#262730"
6
  font = "sans serif"
7
 
 
 
 
8
  [server]
9
  port = 8501
10
+ address = "0.0.0.0"
11
+ headless = true
12
+
13
+ [client]
14
+ toolbarMode = "minimal"
15
+
16
+ [logger]
17
+ level = "info"
18
+
frontend/.streamlit/secrets.toml ADDED
@@ -0,0 +1 @@
 
 
1
+ backend_url = "http://backend:8000"
frontend/Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy requirements
6
+ COPY frontend/requirements.txt .
7
+
8
+ # Install dependencies using uv
9
+ RUN pip install uv && uv pip install --system -r requirements.txt
10
+
11
+ # Copy frontend code
12
+ COPY frontend ./
13
+
14
+ # Expose port
15
+ EXPOSE 8501
16
+
17
+ # Run frontend
18
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
frontend/requirements.txt CHANGED
@@ -1,5 +1,7 @@
1
- streamlit>=1.28.0
2
- requests>=2.31.0
3
- pandas>=2.0.0
4
- plotly>=5.17.0
5
- python-dotenv>=1.0.0
 
 
 
1
+ streamlit==1.29.0
2
+ requests==2.31.0
3
+ pandas==2.1.3
4
+ numpy>=1.26.0,<2.0
5
+ openpyxl==3.1.2
6
+ plotly==5.17.0
7
+ python-dotenv==1.0.0