# 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"]