Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM python:3.11-slim

# Prevent Python from buffering stdout/stderr
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1

# Configure the base url and optional the max no turns
# and polling
ENV MINION_BASE_URL=http://<enter your base url here>/v1 \
MINION_API_KEY=nokey \
MINION_BASH_POLL_SECONDS=3 \
MINION_MAX_MODEL_TURNS=300

# Install git (if cloning during build) and any build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
curl \
procps \
golang \
tini \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Clone the repository
RUN git clone https://github.com/Sentdex/minion.git .

# Install dependencies
RUN if [ -f requirements.txt ]; then \
pip install --no-cache-dir -r requirements.txt; \
elif [ -f pyproject.toml ]; then \
pip install --no-cache-dir .; \
fi

#Entry point tiny to prevent zombies
ENTRYPOINT ["tini", "--"]

# Default command (adjust if necessary)
#CMD ["python", "minion.py"]
CMD ["bash"]