Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- 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"]
|