NaikPriyank commited on
Commit
88a9305
·
verified ·
1 Parent(s): ed14440

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.10 slim image as the base
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set the working directory in the container
9
+ WORKDIR /app
10
+
11
+ # Copy the requirements file into the container
12
+ COPY requirements.txt /app/
13
+
14
+ # Install system dependencies
15
+ RUN apt-get update && apt-get install -y \
16
+ gcc \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --upgrade pip \
21
+ && pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy the application code into the container
24
+ COPY . /app/
25
+
26
+ # Expose the port Streamlit will run on
27
+ EXPOSE 8501
28
+
29
+ # Set Streamlit's configuration to run on all interfaces
30
+ ENV STREAMLIT_SERVER_ENABLECORS=false
31
+ ENV STREAMLIT_SERVER_ENABLEWEBBROWSER=false
32
+ ENV STREAMLIT_SERVER_PORT=8501
33
+
34
+ # Run the Streamlit app
35
+ CMD ["streamlit", "run", "genAI.py", "--server.port=8501"]