Bijoy09 commited on
Commit
7bd1f8b
1 Parent(s): 2dfc2fc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -10
Dockerfile CHANGED
@@ -1,21 +1,19 @@
1
- # Use the official Python 3.10 image
2
  FROM python:3.10
3
 
4
- # Set the Hugging Face token as an environment variable
5
- ARG HUGGINGFACE_HUB_TOKEN
6
- ENV HUGGINGFACE_HUB_TOKEN=${HUGGINGFACE_HUB_TOKEN}
7
-
8
- # Set the working directory inside the container
9
  WORKDIR /app
10
 
11
- # Copy the local files into the container's working directory
12
  COPY . /app
13
 
14
- # Install the dependencies from requirements.txt
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Expose the port FastAPI will use
18
  EXPOSE 7860
19
 
20
- # Run the FastAPI application using Uvicorn
 
 
 
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10
2
 
3
+ # Set working directory
 
 
 
 
4
  WORKDIR /app
5
 
6
+ # Copy project files
7
  COPY . /app
8
 
9
+ # Install dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Expose the port that the app will run on
13
  EXPOSE 7860
14
 
15
+ # Set environment variable for Hugging Face cache directory
16
+ ENV HF_HOME="/app/.cache"
17
+
18
+ # Command to run the FastAPI app with Uvicorn
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]