tannu038 commited on
Commit
1b75bd9
·
verified ·
1 Parent(s): c153f33

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base Image
2
+ FROM python:3.10
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Set working directory
8
+ WORKDIR /app
9
+
10
+ # Copy all project files
11
+ COPY . /app
12
+
13
+ # Install dependencies
14
+ RUN pip install --upgrade pip && \
15
+ pip install fastapi uvicorn streamlit pandas torch transformers scikit-learn faiss-cpu
16
+
17
+ # Expose both ports
18
+ EXPOSE 7860 8000
19
+
20
+ # Run FastAPI and Streamlit together
21
+ CMD uvicorn app:app --host 0.0.0.0 --port 8000 & \
22
+ streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0