randydev commited on
Commit
f73ca2c
·
verified ·
1 Parent(s): f739fc2
Files changed (1) hide show
  1. Dockerfile +37 -2
Dockerfile CHANGED
@@ -1,2 +1,37 @@
1
- FROM rendyprojects/gemini-bot:dev
2
- # todo
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ neofetch && \
14
+ apt-get clean && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ RUN --mount=type=secret,id=GIT_REPO_URL \
18
+ --mount=type=secret,id=GIT_ACCESS_TOKEN \
19
+ git clone https://$(cat /run/secrets/GIT_ACCESS_TOKEN)@$(cat /run/secrets/GIT_REPO_URL | sed 's#https://##') /app && \
20
+ cd /app && \
21
+ git config --global --add safe.directory /app
22
+
23
+ WORKDIR /app
24
+ COPY requirements.txt .
25
+ COPY server.py .
26
+ COPY GeminiDev/ ./GeminiDev/
27
+
28
+ RUN --mount=type=cache,target=/root/.cache/pip \
29
+ pip install --no-cache-dir -r requirements.txt
30
+
31
+ RUN find /app -type d -exec chmod 755 {} \; && \
32
+ find /app -type f -exec chmod 644 {} \; && \
33
+ chmod +x server.py
34
+
35
+ EXPOSE 7860
36
+
37
+ ENTRYPOINT ["sh", "-c", "python3 server.py & python3 -m GeminiDev"]