kleervoyans commited on
Commit
cff2530
·
verified ·
1 Parent(s): f21e2c2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -12
Dockerfile CHANGED
@@ -1,20 +1,21 @@
1
  FROM python:3.10-slim
2
 
3
- # Install dependencies for bitsandbytes and git
4
- RUN apt-get update && apt-get install -y git libgomp1 && \
5
- rm -rf /var/lib/apt/lists/*
 
6
 
7
  WORKDIR /app
8
 
9
- # Copy and install Python dependencies
10
- COPY requirements.txt ./
11
- RUN pip install --no-cache-dir -r requirements.txt
 
12
 
13
- # Copy application code
14
- COPY app.py ./
15
 
16
- # Expose Streamlit port
17
- EXPOSE 8501
18
 
19
- # Launch the Streamlit app
20
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.headless=true"]
 
1
  FROM python:3.10-slim
2
 
3
+ # System deps for bitsandbytes
4
+ RUN apt-get update \
5
+ && apt-get install -y git-lfs libgomp1 \
6
+ && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
 
10
+ # Install Python deps
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir --upgrade pip \
13
+ && pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copy the app
16
+ COPY . .
17
 
18
+ # Streamlit will read $PORT from the environment
19
+ ENV PORT=7860
20
 
21
+ CMD ["bash", "-c", "streamlit run app.py --server.port $PORT --server.enableCORS false --server.headless true"]