admin08077 commited on
Commit
c4d9eaf
·
verified ·
1 Parent(s): e0be08b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.13.5-slim
2
 
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
@@ -9,21 +10,18 @@ RUN apt-get update && apt-get install -y \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy requirements and install
13
  COPY requirements.txt ./
14
  RUN pip3 install --no-cache-dir -r requirements.txt
15
 
16
- # Copy source code
17
- COPY src/ ./src/
18
 
19
- # Set working directory inside container
20
- WORKDIR /app/src
21
-
22
- # Expose port for FastAPI
23
  EXPOSE 8501
24
 
25
- # Optional healthcheck
26
- HEALTHCHECK CMD curl --fail http://localhost:8501/ || exit 1
27
 
28
- # Run FastAPI using uvicorn
29
- ENTRYPOINT ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8501"]
 
1
  FROM python:3.13.5-slim
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
  # Install system dependencies
 
10
  git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Copy requirements and install Python dependencies
14
  COPY requirements.txt ./
15
  RUN pip3 install --no-cache-dir -r requirements.txt
16
 
17
+ # Copy the app directly
18
+ COPY app.py ./
19
 
20
+ # Expose Streamlit default port
 
 
 
21
  EXPOSE 8501
22
 
23
+ # Healthcheck for the Space
24
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
25
 
26
+ # Run Streamlit
27
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]