Skip to content

Commit 72d18e0

Browse files
committed
docs: update wiki.md
1 parent f7acd85 commit 72d18e0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

wiki.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@ then start building a software by ``python3 run.py`` and go to [Visualizer Websi
128128
```commandline
129129
docker cp container_id:/path/in/container /path/on/host
130130
```
131+
132+
### Packaging Your Software into a Docker Image
133+
- Build the image:
134+
```commandline
135+
docker build --build-arg "DEFAULT_CMD=python3 online_log/app.py" -t chatdev:latest .
136+
```
137+
Make sure you replace:
138+
- `online_log/app.py` with the relative path to your Python application's entry point.
139+
- `chatdev` with a name that you want to give to your Docker image.
140+
141+
- Test the image:
142+
```commandline
143+
docker run -itp 8000:8000 chatdev:latest
144+
```
145+
Ensure you replace `chatdev` with the name you used when building the image.
146+
131147
### Official Docker Image
132148
- in preparation
133149
@@ -138,12 +154,12 @@ To run your ChatDev application with Docker Compose, simply:
138154
1. Find the `.env.sample` file in the root directory of your ChatDev project.
139155
2. Copy this file and rename it to `.env`.
140156
3. Open the `.env` file with the text editor of your choice.
141-
4. Replace `<Your OpenAI API Key>` with your actual OpenAI API key from OpenAI.
157+
4. Replace `<Your OpenAI API Key>` with your actual OpenAI API key from OpenAI. Add other environment variables for local development as needed.
142158
5. Initiate the application by running:
143159
```commandline
144-
docker compose up
160+
docker compose run --service-ports chatdev
145161
```
146-
This command will build the Docker image (if necessary) and start the container. By default, it runs the `online_log/app`.py file.
162+
This command will build the Docker image (if necessary) and start the container.
147163

148164
Any changes you make to the project files on your host machine will sync in real-time inside the container, thanks to the configured bind mount in `docker-compose.yml`.
149165

0 commit comments

Comments
 (0)