NaikPriyank commited on
Commit
03de8a4
·
verified ·
1 Parent(s): 3f1425d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -4,6 +4,7 @@ FROM python:3.10-slim
4
  # Set environment variables
5
  ENV PYTHONDONTWRITEBYTECODE=1
6
  ENV PYTHONUNBUFFERED=1
 
7
 
8
  # Set the working directory in the container
9
  WORKDIR /app
@@ -16,6 +17,8 @@ RUN apt-get update && apt-get install -y \
16
  gcc \
17
  && rm -rf /var/lib/apt/lists/*
18
 
 
 
19
  # Install Python dependencies
20
  RUN pip install --upgrade pip \
21
  && pip install --no-cache-dir -r requirements.txt
@@ -24,7 +27,7 @@ RUN pip install --upgrade pip \
24
  COPY . /app/
25
 
26
  # Expose the port Streamlit will run on
27
- EXPOSE 8501
28
 
29
  # Set Streamlit's configuration to run on all interfaces
30
  ENV STREAMLIT_SERVER_ENABLECORS=false
 
4
  # Set environment variables
5
  ENV PYTHONDONTWRITEBYTECODE=1
6
  ENV PYTHONUNBUFFERED=1
7
+ ENV TRANSFORMERS_CACHE=/app/.cache
8
 
9
  # Set the working directory in the container
10
  WORKDIR /app
 
17
  gcc \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
21
+
22
  # Install Python dependencies
23
  RUN pip install --upgrade pip \
24
  && pip install --no-cache-dir -r requirements.txt
 
27
  COPY . /app/
28
 
29
  # Expose the port Streamlit will run on
30
+ EXPOSE 7860
31
 
32
  # Set Streamlit's configuration to run on all interfaces
33
  ENV STREAMLIT_SERVER_ENABLECORS=false