Create Dockerfile
Browse files- Dockerfile +32 -0
Dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# syntax=docker/dockerfile:1.4
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
RUN apt-get update -qq && \
|
5 |
+
apt-get install -y --no-install-recommends \
|
6 |
+
ffmpeg \
|
7 |
+
curl \
|
8 |
+
git \
|
9 |
+
gnupg2 \
|
10 |
+
unzip \
|
11 |
+
wget \
|
12 |
+
python3-pip && \
|
13 |
+
apt-get clean && \
|
14 |
+
rm -rf /var/lib/apt/lists/*
|
15 |
+
|
16 |
+
WORKDIR /app
|
17 |
+
|
18 |
+
RUN --mount=type=secret,id=GIT_REPO_URL \
|
19 |
+
--mount=type=secret,id=GIT_ACCESS_TOKEN \
|
20 |
+
git clone https://$(cat /run/secrets/GIT_ACCESS_TOKEN)@$(cat /run/secrets/GIT_REPO_URL | sed 's#https://##') . && \
|
21 |
+
git config --global --add safe.directory /app
|
22 |
+
|
23 |
+
RUN --mount=type=cache,target=/root/.cache/pip \
|
24 |
+
pip3 install --no-cache-dir -r requirements.txt
|
25 |
+
|
26 |
+
RUN find . -type d -exec chmod 777 {} \; && \
|
27 |
+
find . -type f -exec chmod 644 {} \; && \
|
28 |
+
chmod +x server.py
|
29 |
+
|
30 |
+
EXPOSE 7860
|
31 |
+
|
32 |
+
ENTRYPOINT ["sh", "-c", "python3 server.py & python3 -m RyzenthDev"]
|