parthib07 commited on
Commit
579cf4a
·
verified ·
1 Parent(s): a2a74a8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -14
Dockerfile CHANGED
@@ -1,28 +1,22 @@
1
  FROM python:3.11-slim
2
 
3
- ENV PYTHONDONTWRITEBYTECODE=1 \
4
- PYTHONUNBUFFERED=1 \
5
- PIP_NO_CACHE_DIR=1 \
6
- PORT=7860
7
 
8
  WORKDIR /app
9
 
10
- # Install system dependencies
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
12
  build-essential \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Copy requirements file
16
- COPY requirements.txt /app/requirements.txt
17
 
18
- # Install Python dependencies
19
- RUN pip install --upgrade pip && pip install -r /app/requirements.txt
20
 
21
- # Copy entire project
22
- COPY . /app
23
 
24
- # HuggingFace Spaces / Streamlit port
25
  EXPOSE 7860
26
 
27
- # Run Streamlit
28
- CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860", "--server.headless=true"]
 
1
  FROM python:3.11-slim
2
 
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV PIP_NO_CACHE_DIR=1
6
+ ENV PORT=7860
7
 
8
  WORKDIR /app
9
 
 
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  build-essential \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ COPY requirements.txt .
 
15
 
16
+ RUN pip install --upgrade pip && pip install -r requirements.txt
 
17
 
18
+ COPY . .
 
19
 
 
20
  EXPOSE 7860
21
 
22
+ CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 --server.headless=true