TomYTZ commited on
Commit
3b233fc
1 Parent(s): a835d9e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.11 image from Docker Hub
2
+ FROM python:3.11-slim
3
+
4
+
5
+
6
+ # Install git in the container
7
+ RUN apt-get update && apt-get install -y git
8
+ ARG GITHUB_TOKEN
9
+
10
+ RUN --mount=type=secret,id=git_link,mode=0444,required=true \
11
+ git clone $(cat /run/secrets/git_link) /app
12
+ # Clone your private GitHub repository
13
+ # RUN git clone $(cat /run/secrets/git_link) /app
14
+
15
+ # Set the working directory in the container
16
+ WORKDIR /app
17
+
18
+ # Install Python dependencies
19
+ RUN pip install -r requirements.txt
20
+
21
+ # Expose the port the app runs on
22
+ EXPOSE 7860
23
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
24
+
25
+ # Command to run the app
26
+ CMD ["python", "cold_start_demo.py"]