banao-tech commited on
Commit
67cc59d
·
verified ·
1 Parent(s): 6dfa2cd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
- FROM huggingface.co/space/banao-tech/omniparser1:latest
2
- #huggingface.co/spaces/banao-tech/OmniParser1
 
3
  USER root
4
 
5
  # Install Python and system dependencies in a single layer
@@ -18,9 +19,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
-
22
-
23
  COPY main.py main.py
24
  COPY utils.py utils.py
 
 
25
  RUN python main.py
26
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
1
+ # Use the base image from your Hugging Face space
2
+ FROM huggingface.co/spaces/banao-tech/OmniParser1:latest # Replace with your username if it's hosted by you
3
+
4
  USER root
5
 
6
  # Install Python and system dependencies in a single layer
 
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # Copy your Python files
 
23
  COPY main.py main.py
24
  COPY utils.py utils.py
25
+
26
+ # Run your main script
27
  RUN python main.py
28
+
29
+ # Start the application using Uvicorn
30
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]