sathvikk commited on
Commit
aa14e95
·
verified ·
1 Parent(s): 5a8cb35

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -2,24 +2,29 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  libgl1 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  RUN mkdir -p /cache && chmod -R 777 /cache
11
 
 
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- COPY . .
 
16
 
 
17
  ENV TRANSFORMERS_CACHE=/cache
18
  ENV STREAMLIT_SERVER_PORT=8501
19
  ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=10
20
  EXPOSE 8501
21
 
22
- CMD ["streamlit", "run", "streamlit_app.py", \
23
  "--server.port=8501", \
24
  "--server.address=0.0.0.0", \
25
  "--server.maxUploadSize=10", \
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  libgl1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Create cache directory
12
  RUN mkdir -p /cache && chmod -R 777 /cache
13
 
14
+ # Copy requirements first for better caching
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy application
19
+ COPY app/ ./app/
20
 
21
+ # Set environment variables
22
  ENV TRANSFORMERS_CACHE=/cache
23
  ENV STREAMLIT_SERVER_PORT=8501
24
  ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=10
25
  EXPOSE 8501
26
 
27
+ CMD ["streamlit", "run", "app/streamlit_app.py", \
28
  "--server.port=8501", \
29
  "--server.address=0.0.0.0", \
30
  "--server.maxUploadSize=10", \