zach9111 commited on
Commit
cce04be
·
verified ·
1 Parent(s): e5a9ca0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10-slim
2
 
3
- # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  tesseract-ocr \
6
  libgl1-mesa-glx \
@@ -12,7 +12,7 @@ RUN useradd -m appuser
12
  USER appuser
13
  WORKDIR /home/appuser/app
14
 
15
- # Set environment vars
16
  ENV HOME=/home/appuser
17
  ENV STREAMLIT_HOME=/home/appuser/.streamlit
18
  RUN mkdir -p $STREAMLIT_HOME
@@ -26,12 +26,15 @@ enableCORS = false\n\
26
  enableXsrfProtection = false\n\
27
  \n" > $STREAMLIT_HOME/config.toml
28
 
29
- # Install Python dependencies
30
  COPY requirements.txt .
31
  RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
32
 
33
- # Copy app
34
  COPY . .
35
 
 
36
  EXPOSE 7860
37
- CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  tesseract-ocr \
6
  libgl1-mesa-glx \
 
12
  USER appuser
13
  WORKDIR /home/appuser/app
14
 
15
+ # Set environment
16
  ENV HOME=/home/appuser
17
  ENV STREAMLIT_HOME=/home/appuser/.streamlit
18
  RUN mkdir -p $STREAMLIT_HOME
 
26
  enableXsrfProtection = false\n\
27
  \n" > $STREAMLIT_HOME/config.toml
28
 
29
+ # Copy requirements and install
30
  COPY requirements.txt .
31
  RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
32
 
33
+ # Copy all code
34
  COPY . .
35
 
36
+ # Expose port
37
  EXPOSE 7860
38
+
39
+ # Run Streamlit
40
+ CMD ["python", "-m", "streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]