arcsu1 commited on
Commit
1829e21
·
1 Parent(s): af16851
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -1,12 +1,20 @@
1
  FROM python:3.10.12
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY . /app
6
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
 
9
  EXPOSE 8000
10
 
 
11
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
12
 
 
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