khurrameycon commited on
Commit
8fed3a8
·
verified ·
1 Parent(s): b405fea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -1,18 +1,21 @@
1
  # Use the official Python slim image
2
  FROM python:3.8-slim
3
 
4
- # Set the working directory
 
 
 
5
  WORKDIR /app
6
 
7
- # Copy requirements and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy the application code
12
  COPY . .
13
 
14
  # Expose the port FastAPI will run on
15
  EXPOSE 7860
16
 
17
- # Command to run the application
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  # Use the official Python slim image
2
  FROM python:3.8-slim
3
 
4
+ # Set environment variable for Hugging Face cache
5
+ ENV HF_HOME=/tmp/.huggingface
6
+
7
+ # Working directory
8
  WORKDIR /app
9
 
10
+ # Copy dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy application code
15
  COPY . .
16
 
17
  # Expose the port FastAPI will run on
18
  EXPOSE 7860
19
 
20
+ # Run the API
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]