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