bhumitps commited on
Commit
135ba2d
·
verified ·
1 Parent(s): f75d09c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -17
Dockerfile CHANGED
@@ -1,27 +1,21 @@
1
  # Use a lightweight Python image
2
  FROM python:3.11-slim
3
 
4
- # Prevents Python from writing .pyc files and buffering stdout/stderr
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
7
-
8
- # Set working directory
9
  WORKDIR /app
10
 
11
- # Copy project files
12
- COPY . /app
13
 
14
- # Upgrade pip and install dependencies
15
  RUN pip install --upgrade pip \
16
- && pip install -r tourism_project/deployment/requirements.txt
17
 
18
- # Expose the port used by Streamlit
19
- EXPOSE 7860
20
 
21
- # Streamlit specific environment variables (optional tweaks)
22
- ENV STREAMLIT_SERVER_HEADLESS=true
23
- ENV STREAMLIT_SERVER_PORT=7860
24
- ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
25
 
26
- # Default command to run the Streamlit app
27
- CMD ["streamlit", "run", "tourism_project/deployment/app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
  # Use a lightweight Python image
2
  FROM python:3.11-slim
3
 
4
+ # Set working directory inside the container
 
 
 
 
5
  WORKDIR /app
6
 
7
+ # Copy requirements into the image
8
+ COPY requirements.txt .
9
 
10
+ # Install dependencies
11
  RUN pip install --upgrade pip \
12
+ && pip install -r requirements.txt
13
 
14
+ # Copy the rest of the app code
15
+ COPY . .
16
 
17
+ # Expose the default Hugging Face Space port
18
+ EXPOSE 7860
 
 
19
 
20
+ # Run Streamlit app
21
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]