anindya-hf-2002 commited on
Commit
6688374
·
verified ·
1 Parent(s): 59e3b1b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -8,7 +8,7 @@ RUN apt-get update && \
8
  procps \
9
  git \
10
  wget \
11
- lsof && \ # Remove sudo from here
12
  rm -rf /var/lib/apt/lists/*
13
 
14
  # Set working directory
@@ -18,7 +18,7 @@ WORKDIR /app
18
  COPY requirements.txt .
19
  COPY src/ ./src/
20
  COPY *.py ./
21
- COPY execute.sh ./execute.sh
22
 
23
  # Install Python dependencies
24
  RUN pip install --no-cache-dir -r requirements.txt
@@ -30,10 +30,13 @@ ENV PYTHONPATH=/app
30
  RUN mkdir -p /root/.ollama
31
 
32
  # Expose ports for both Streamlit and Ollama
33
- EXPOSE 8501 11434
34
 
35
  # Make sure execute.sh is executable
36
  RUN chmod +x ./execute.sh
37
 
 
 
 
38
  # Set the entrypoint
39
  ENTRYPOINT ["./execute.sh"]
 
8
  procps \
9
  git \
10
  wget \
11
+ lsof && \
12
  rm -rf /var/lib/apt/lists/*
13
 
14
  # Set working directory
 
18
  COPY requirements.txt .
19
  COPY src/ ./src/
20
  COPY *.py ./
21
+ COPY execute.sh ./execute.sh
22
 
23
  # Install Python dependencies
24
  RUN pip install --no-cache-dir -r requirements.txt
 
30
  RUN mkdir -p /root/.ollama
31
 
32
  # Expose ports for both Streamlit and Ollama
33
+ EXPOSE 80 # Hugging Face requires the app to listen on port 80
34
 
35
  # Make sure execute.sh is executable
36
  RUN chmod +x ./execute.sh
37
 
38
+ # Adjust execute.sh to start Streamlit on port 80
39
+ RUN sed -i 's/--server.port 8501/--server.port 80/g' execute.sh
40
+
41
  # Set the entrypoint
42
  ENTRYPOINT ["./execute.sh"]