Deepakraj2006 commited on
Commit
acbe15f
·
verified ·
1 Parent(s): 8d686c5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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", "server.py"]