Deepakraj2006 commited on
Commit
3c7c6bc
·
verified ·
1 Parent(s): bb4e9ca

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -12
Dockerfile CHANGED
@@ -1,21 +1,20 @@
1
- # Use an official Python runtime as base image
2
- FROM python:3.10-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy the requirements file and install dependencies
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy the app files
12
- COPY . .
13
 
14
  # Expose the port Flask runs on
15
- EXPOSE 7860
16
 
17
- # Set environment variable for Hugging Face API Key (to be set in Spaces)
18
- ENV HUGGINGFACEHUB_API_TOKEN=""
19
 
20
- # Run the application
21
- CMD ["python", "app.py"]
 
1
+ # Use an official Python runtime as a base image
2
+ FROM python:3.9-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Copy the current directory contents into the container
8
+ COPY . /app
 
9
 
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Expose the port Flask runs on
14
+ EXPOSE 8000
15
 
16
+ # Define environment variable
17
+ ENV FLASK_APP=app.py
18
 
19
+ # Run the Flask app
20
+ CMD ["python", "app.py"]