jakewatson91 commited on
Commit
57b8244
·
unverified ·
1 Parent(s): 3b2bf39

Update Dockerfile

Browse files

updated dockerfile

Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -1,9 +1,13 @@
 
1
  FROM python:3.10-slim
2
-
3
  WORKDIR /opt/app
 
 
 
 
 
4
  COPY . .
5
- RUN pip install --no-cache-dir -r /opt/app/requirements.txt
6
-
7
  # Install packages that we need. vim is for helping with debugging
8
  ENV DEBIAN_FRONTEND noninteractive
9
  RUN apt-get update && \
@@ -16,4 +20,5 @@ EXPOSE 8000
16
  EXPOSE 9100
17
  ENV GRADIO_SERVER_NAME="0.0.0.0"
18
 
19
- CMD bash -c "/usr/bin/prometheus-node-exporter --web.listen-address='0.0.0.0:9100' & /usr/local/bin/python3 /opt/app/app.py"
 
 
1
+ # Base image
2
  FROM python:3.10-slim
3
+ # Set working directory
4
  WORKDIR /opt/app
5
+ # Copy only requirements.txt first
6
+ COPY requirements.txt /opt/app/
7
+ # Install dependencies
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+ # Copy the rest of the application
10
  COPY . .
 
 
11
  # Install packages that we need. vim is for helping with debugging
12
  ENV DEBIAN_FRONTEND noninteractive
13
  RUN apt-get update && \
 
20
  EXPOSE 9100
21
  ENV GRADIO_SERVER_NAME="0.0.0.0"
22
 
23
+ CMD bash -c "/usr/local/bin/python3 /opt/app/app.py"
24
+ # /usr/bin/prometheus-node-exporter --web.listen-address='0.0.0.0:9100' &