Created
May 3, 2024 01:48
-
-
Save ran-dall/f368772791a9093a2c4e66cfb026894f to your computer and use it in GitHub Desktop.
This Docker container facilitates the use of gpt-repository-loader, a CLI tool that formats Git repositories for AI analysis.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an official Python runtime as a parent image | |
FROM python:3.9-slim | |
# Install git | |
RUN apt-get update && \ | |
apt-get install -y git && \ | |
rm -rf /var/lib/apt/lists/* | |
# Set the working directory in the container | |
WORKDIR /usr/src/app | |
# Clone the gpt-repository-loader repository from GitHub | |
RUN git clone https://github.com/mpoon/gpt-repository-loader.git . | |
# Create a volume for the repository | |
VOLUME /usr/src/repo | |
# Set the entry point for the container | |
ENTRYPOINT ["python", "/usr/src/app/gpt_repository_loader.py"] | |
# Default command if no repository path is provided at runtime | |
CMD ["/usr/src/repo", "-o", "/usr/src/repo/output.txt"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just build (
docker build -t gpt-repository-loader:latest .
) mount your repository and start converting.Example:
docker run -v /path/to/your/repo:/usr/src/repo gpt-repository-loader
You should get an
output.txt
file added to your mounted repo and profit!Shoutout to @mpoon for creating such an awesome tool!