rodrigomasini commited on
Commit
9ee1d96
·
verified ·
1 Parent(s): 3c010b0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -1,16 +1,23 @@
 
1
  FROM python:3.11-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
 
9
  COPY . .
10
 
11
- # We need to make port 8080 available since HuggingFace Spaces uses this port to expose the app
12
  EXPOSE 8080
13
 
 
14
  ENV NICEGUI_NATIVE=false
15
 
 
16
  CMD python main.py
 
1
+ # Use an official Python runtime as a parent image
2
  FROM python:3.11-slim
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file into the container
8
  COPY requirements.txt .
9
 
10
+ # Install any needed packages specified in requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy the rest of the application's code into the container
14
  COPY . .
15
 
16
+ # EXPOSE is good practice but the README's app_port is what HF uses
17
  EXPOSE 8080
18
 
19
+ # Define environment variable to run NiceGUI in non-native mode
20
  ENV NICEGUI_NATIVE=false
21
 
22
+ # Use the shell form of CMD for maximum compatibility with the HF platform
23
  CMD python main.py