rxmha125 commited on
Commit
06f204e
·
verified ·
1 Parent(s): 63b2ff0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -8,7 +8,6 @@ WORKDIR /code
8
  ENV HF_HOME /code/.cache
9
 
10
  # Create the cache directory and make it fully writable.
11
- # This is a simpler and more direct fix for the permission error.
12
  RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
13
 
14
  # Copy and install requirements
@@ -18,6 +17,9 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
18
  # Copy application code
19
  COPY ./app.py /code/app.py
20
 
21
- # Expose port and run application
22
- EXPOSE 8000
23
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
8
  ENV HF_HOME /code/.cache
9
 
10
  # Create the cache directory and make it fully writable.
 
11
  RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
12
 
13
  # Copy and install requirements
 
17
  # Copy application code
18
  COPY ./app.py /code/app.py
19
 
20
+ # --- *** THE ONLY CHANGE IS THE PORT NUMBER *** ---
21
+ # Expose the port Hugging Face Spaces expects
22
+ EXPOSE 7860
23
+
24
+ # Run the application on port 7860
25
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]