Bijoy09 commited on
Commit
feb5b5d
1 Parent(s): dbe1f8e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,16 +1,21 @@
 
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
- # Command to run the FastAPI app with Uvicorn
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
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"]