Skip to content

Commit

Permalink
Refactor files for docker (AntonOsika#588)
Browse files Browse the repository at this point in the history
* Remove poetry

* Clean up file bloat

* Use right docker path
  • Loading branch information
AntonOsika authored and 70ziko committed Oct 25, 2023
1 parent 62193eb commit 326cdd9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 34 deletions.
45 changes: 11 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ Choose either **stable** or **development**.

For **stable** release:

- `pip install gpt-engineer`
- `python -m pip install gpt-engineer`

For **development**:
- `git clone https://github.com/AntonOsika/gpt-engineer.git`
- `cd gpt-engineer`
- `pip install -e .`
- `python -m pip install -e .`
- (or: `make install && source venv/bin/activate` for a venv)

**Setup**
**API Key**

With an OpenAI API key (preferably with GPT-4 access) run:
With an OpenAI API key run:

- `export OPENAI_API_KEY=[your api key]`

To set API key on windows check the [Windows README](./WINDOWS_README.md).
Check the [Windows README](./WINDOWS_README.md) for windows usage.

**Run**:
**Running**

- Create an empty folder. If inside the repo, you can run:
- `cp -r projects/example/ projects/my-new-project`
Expand All @@ -54,38 +54,15 @@ To set API key on windows check the [Windows README](./WINDOWS_README.md).
By running gpt-engineer you agree to our [terms](https://github.com/AntonOsika/gpt-engineer/blob/main/TERMS_OF_USE.md).

**Results**
- Check the generated files in `projects/my-new-project/workspace`

Check the generated files in `projects/my-new-project/workspace`

To **run in the browser** you can simply:
**Alternatives**

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/AntonOsika/gpt-engineer/codespaces)


## Getting Started using Docker

**Running using docker cli**:

Building the image:
- `git clone https://github.com/AntonOsika/gpt-engineer.git`
- `cd gpt-engineer`
- `docker build --rm -t gpt-engineer .`

Running the container:
- `docker run -it --rm -e OPENAI_API_KEY="YOUR OPENAI KEY" -v ./your-project:/project gpt-engineer`

The `-v` flag mounts the `your-project` folder into the container. Make sure to have a `prompt` file in there.

**Running using docker-compose cli**:

Building the image:
- `git clone https://github.com/AntonOsika/gpt-engineer.git`
- `cd gpt-engineer`
- `docker-compose build`
- `docker-compose run --rm gpt-engineer`

Set the OPENAI_API_KEY in docker-compose.yml using .env file or environment variable, and mount your project folder into the container using volumes. for example "./projects/example:/project" ./projects/example is the path to your project folder.
You can check [Docker instructions](docker/README.md) to use Docker, or simply
do everything in your browser:

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/AntonOsika/gpt-engineer/codespaces)

## Features

Expand Down
1 change: 1 addition & 0 deletions Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN apt-get update \
WORKDIR /app

COPY . .
COPY docker/entrypoint.sh ./entrypoint.sh

RUN sudo pip install -e .

Expand Down
24 changes: 24 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Getting Started using Docker

**Running using docker cli**:

Building the image:
- `git clone https://github.com/AntonOsika/gpt-engineer.git`
- `cd gpt-engineer`
- `docker build --rm -t gpt-engineer -f docker/Dockerfile .`

Running the container:
- `docker run -it --rm -e OPENAI_API_KEY="YOUR OPENAI KEY" -v ./your-project:/project gpt-engineer`

The `-v` flag mounts the `your-project` folder into the container. Make sure to have a `prompt` file in there.

**Running using docker-compose cli**:

Building the image:
- `git clone https://github.com/AntonOsika/gpt-engineer.git`
- `cd gpt-engineer`
- `docker-compose build -f docker/docker-compose.yml`
- `docker-compose run --rm gpt-engineer`


Set the OPENAI_API_KEY in docker/docker-compose.yml using .env file or environment variable, and mount your project folder into the container using volumes. for example "./projects/example:/project" ./projects/example is the path to your project folder.
File renamed without changes.
File renamed without changes.

0 comments on commit 326cdd9

Please sign in to comment.