forked from AntonOsika/gpt-engineer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker And Docker-Compose Support (AntonOsika#538)
* Added Docker support. * Fixed a typo. * Added .dockerignore * Update README.md Co-authored-by: karlderkaefer <karlderkaefer@users.noreply.github.com> --------- Co-authored-by: MurdieX <Ayoub Fletcher> Co-authored-by: karlderkaefer <karlderkaefer@users.noreply.github.com>
- Loading branch information
1 parent
95c8655
commit 37550ff
Showing
5 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
dist/ | ||
build/ | ||
*.egg-info/ | ||
*.egg | ||
|
||
# Virtual environments | ||
.env | ||
.env.sh | ||
venv/ | ||
ENV/ | ||
|
||
# IDE-specific files | ||
.vscode/ | ||
.idea/ | ||
|
||
# Compiled Python modules | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
|
||
# Python testing | ||
.pytest_cache/ | ||
.ruff_cache/ | ||
.coverage | ||
.mypy_cache/ | ||
|
||
# macOS specific files | ||
.DS_Store | ||
|
||
# Windows specific files | ||
Thumbs.db | ||
|
||
# this application's specific files | ||
archive | ||
|
||
# any log file | ||
*log.txt | ||
todo | ||
scratchpad | ||
|
||
# Ignore GPT Engineer files | ||
projects | ||
!projects/example | ||
|
||
# Pyenv | ||
.python-version | ||
|
||
# Benchmark files | ||
benchmark | ||
!benchmark/*/prompt | ||
|
||
.gpte_consent |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.9-slim | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y sudo | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN sudo pip install -e . | ||
|
||
ENTRYPOINT ["bash", "/app/entrypoint.sh"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: "3" | ||
|
||
services: | ||
gpt-engineer: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
stdin_open: true | ||
tty: true | ||
# Set the API key from the .env file | ||
env_file: | ||
- .env | ||
## OR set the API key directly | ||
# environment: | ||
# - OPENAI_API_KEY="YOUR_API_KEY_HERE" | ||
image: gpt-engineer | ||
volumes: | ||
- ./projects/example:/project | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
project_dir="/project" | ||
|
||
# Run the gpt engineer script | ||
gpt-engineer $project_dir "$@" | ||
|
||
# Patch the permissions of the generated files to be owned by nobody except prompt file | ||
for item in "$project_dir"/*; do | ||
if [[ "$item" != "$project_dir/prompt" ]]; then | ||
chown -R nobody:nogroup "$item" | ||
chmod -R 777 "$item" | ||
fi | ||
done | ||
|