logeswari commited on
Commit
dcb342a
·
1 Parent(s): d1f09e7
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -3,10 +3,11 @@ FROM python:3.9
3
  # Set the working directory
4
  WORKDIR /app
5
 
6
- # Copy the necessary files
7
- COPY requirements.txt ./
8
 
9
- # Install dependencies
 
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
  # Copy the FastAPI application code
@@ -16,4 +17,4 @@ COPY . .
16
  EXPOSE 8000
17
 
18
  # Command to run the application
19
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
3
  # Set the working directory
4
  WORKDIR /app
5
 
6
+ # Set an environment variable to redirect Hugging Face cache
7
+ ENV HF_HOME=/app/huggingface_cache
8
 
9
+ # Copy requirements and install dependencies
10
+ COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Copy the FastAPI application code
 
17
  EXPOSE 8000
18
 
19
  # Command to run the application
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]