Vela commited on
Commit
c3c8698
·
1 Parent(s): 0f6ea9a

added docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 requirement.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
+ # Start FastAPI & Streamlit together using tmux
19
+
20
+ CMD ["sh", "-c", "uvicorn src.backend.main:app --host 0.0.0.0 --port 8000 & sleep 5 && streamlit run frontend/home.py --server.port 7860 --server.address 0.0.0.0"]