molehh commited on
Commit
02b2ce1
·
1 Parent(s): e602ec4

updated docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ WORKDIR /app
4
+
5
+ COPY . /app
6
+
7
+ RUN pip install --upgrade pip
8
+ RUN pip install -r requirements.txt
9
+
10
+ EXPOSE 7860
11
+
12
+ # Ensure logs directory exists
13
+ RUN mkdir -p /app/logs && chmod -R 777 /app/logs
14
+
15
+ # Install tmux to run multiple processes
16
+ RUN apt-get update && apt-get install -y tmux
17
+
18
+ # Set Python path
19
+ ENV PYTHONPATH="/app/src"
20
+
21
+ # Start FastAPI & Streamlit together using tmux
22
+
23
+ CMD ["sh", "-c", "fastapi dev src/backend/main.py --host 0.0.0.0 --port 8000 & sleep 5 && streamlit run src/frontend/home.py --server.port 7860 --server.address 0.0.0.0"]