arcsu1 commited on
Commit
9b582ec
·
1 Parent(s): 1829e21
Files changed (1) hide show
  1. Dockerfile +8 -14
Dockerfile CHANGED
@@ -1,20 +1,14 @@
1
  FROM python:3.10.12
2
 
3
- # Set the working directory in the container
4
- WORKDIR /app
5
 
6
- # Set the environment variable for the Hugging Face cache
7
- ENV TRANSFORMERS_CACHE=/app/.cache
8
 
9
- # Copy the current directory contents into the container at /app
10
- COPY . /app
11
 
12
- # Install the Python dependencies from requirements.txt
13
- RUN pip install --no-cache-dir -r requirements.txt
14
-
15
- # Expose port 8000 to the outside world
16
- EXPOSE 8000
17
-
18
- # Command to run the FastAPI app using Uvicorn
19
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
20
 
 
1
  FROM python:3.10.12
2
 
3
+ # Copy the current directory contents into the container at .
4
+ COPY . .
5
 
6
+ # Set the working directory to /
7
+ WORKDIR /
8
 
9
+ # Install requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r /requirements.txt
11
 
12
+ # Start the FastAPI app on port 7860, the default port expected by Spaces
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
14