Arjon07CSE commited on
Commit
72c21cc
·
verified ·
1 Parent(s): eca472c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -1,29 +1,28 @@
1
- # 1. Use Python 3.10 (The stable version for AI)
2
  FROM python:3.10-slim
3
 
4
  # 2. Set working directory
5
  WORKDIR /app
6
 
7
- # 3. Install system build dependencies
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
11
  git \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # 4. Copy requirements and install them
15
  COPY requirements.txt ./
16
  RUN pip3 install --no-cache-dir -r requirements.txt
17
 
18
- # 5. Copy the source code
19
- # (This assumes your file is inside a folder named 'src')
20
  COPY src/ ./src/
21
 
22
- # 6. Expose the port
23
  EXPOSE 8501
24
 
25
  # 7. Healthcheck
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27
 
28
- # 8. Start the App
29
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ # 1. Use Python 3.10 (Stable for AI)
2
  FROM python:3.10-slim
3
 
4
  # 2. Set working directory
5
  WORKDIR /app
6
 
7
+ # 3. Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
11
  git \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # 4. Copy requirements (assuming it's in the root folder)
15
  COPY requirements.txt ./
16
  RUN pip3 install --no-cache-dir -r requirements.txt
17
 
18
+ # 5. Copy the 'src' folder into the container
 
19
  COPY src/ ./src/
20
 
21
+ # 6. Expose port
22
  EXPOSE 8501
23
 
24
  # 7. Healthcheck
25
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
26
 
27
+ # 8. Run the app located inside src/
28
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]