PadmasaliGovardhan commited on
Commit
f31d983
·
1 Parent(s): 8d21c22

Dockerfile file adding

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -6
  2. README.md +1 -1
Dockerfile CHANGED
@@ -9,14 +9,12 @@ COPY app/requirements.txt /code/requirements.txt
9
  # Install dependencies
10
  RUN pip install --no-cache-dir -r /code/requirements.txt
11
 
12
- # Copy your app files
13
  COPY app /code/app
14
- COPY main_entry.py /code/app.py
15
 
16
-
17
- # Expose Hugging Face’s port
18
  EXPOSE 7860
19
 
20
- # Start FastAPI
21
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
22
 
 
9
  # Install dependencies
10
  RUN pip install --no-cache-dir -r /code/requirements.txt
11
 
12
+ # Copy your app package
13
  COPY app /code/app
 
14
 
15
+ # Expose port (Hugging Face uses 7860 or the platform $PORT)
 
16
  EXPOSE 7860
17
 
18
+ # Start FastAPI using the package (no name conflict)
19
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
20
 
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 📘
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
7
- app_file: main_entry.py
8
  pinned: false
9
  ---
10
 
 
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
7
+ app_file: app.main
8
  pinned: false
9
  ---
10