BarBar288 commited on
Commit
e91e77c
·
verified ·
1 Parent(s): f2b389b

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 a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /home/user/app
6
+
7
+ # Copy the current directory contents into the container at /home/user/app
8
+ COPY . /home/user/app
9
+
10
+ # Install any needed packages specified in requirements.txt
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Set the environment variable for Hugging Face access token
14
+ ARG ACC_TOKEN
15
+ ENV AccToken=${ACC_TOKEN}
16
+
17
+ # Expose the port the app runs on (if necessary)
18
+ EXPOSE 7860
19
+
20
+ # Define the command to run the application
21
+ CMD ["python", "app.py"]