tejash300 commited on
Commit
9e88a99
·
verified ·
1 Parent(s): d629e1d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -38,11 +38,12 @@ RUN mkdir -p /app/static /app/temp && chmod -R 777 /app/static /app/temp
38
  # Copy the rest of your application code into the container
39
  COPY . /app
40
 
41
- # **New line:** Set permissions for the entire /app directory (including fine_tuned_legal_qa)
42
  RUN chmod -R 777 /app
43
 
44
- # Expose the port your app runs on
45
- EXPOSE 8500
 
46
 
47
- # Run the FastAPI application using uvicorn
48
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8500"]
 
38
  # Copy the rest of your application code into the container
39
  COPY . /app
40
 
41
+ # Set permissions for the entire /app directory (including fine_tuned_legal_qa)
42
  RUN chmod -R 777 /app
43
 
44
+ # Set a default port; Hugging Face Spaces sets PORT automatically
45
+ ENV PORT=7860
46
+ EXPOSE 7860
47
 
48
+ # Run the FastAPI application using uvicorn on the dynamic port
49
+ CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT}"]