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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -2,29 +2,26 @@ FROM python:3.9-slim
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 src/ ./src/
20
 
21
- # Set environment variables
22
  ENV TRANSFORMERS_CACHE=/cache
23
  ENV STREAMLIT_SERVER_PORT=8501
24
- ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200
25
  EXPOSE 8501
26
 
27
- CMD ["streamlit", "run", "src/streamlit_app.py", \
28
  "--server.port=8501", \
29
  "--server.address=0.0.0.0", \
30
- "--server.maxUploadSize=200"]
 
 
 
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", \
26
+ "--server.enableXsrfProtection=false", \
27
+ "--server.enableCORS=false"]