docker volume map fix
frdel committed
Nov 19, 2024 at 00:43 UTC
c7046fa97b29bba305b4617299f88a21f4247838
5 files changed
+15
-27
docker/run/docker-compose.yml
+1
-3
@@ -1,5 +1,3 @@
1
-version: '3'
2
-
1
services:
2
agent-zero:
3
container_name: agent-zero
@@ -7,4 +5,4 @@ services:
5
volumes:
6
- ./agent-zero:/a0
7
ports:
10
- - "8080:80"
\ No newline at end of file
8
+ - "50080:80"
\ No newline at end of file
docker/run/docker_manager_mac_linux.sh
renamed
docker/run/fs/exe/run_A0.sh
+5
-5
@@ -26,11 +26,11 @@ while true; do
26
27
setup_venv
28
29
- # # Copy repository files if target is empty
30
- # if [ -z "$(ls -A "$TARGET_DIR")" ]; then
31
- # echo "Copying files from $SOURCE_DIR to $TARGET_DIR..."
32
- # cp -rn --no-preserve=ownership,mode "$SOURCE_DIR/." "$TARGET_DIR"
33
- # fi
29
+ # Copy repository files if target is empty
30
+ if [ -z "$(ls -A "$TARGET_DIR")" ]; then
31
+ echo "Copying files from $SOURCE_DIR to $TARGET_DIR..."
32
+ cp -rn --no-preserve=ownership,mode "$SOURCE_DIR/." "$TARGET_DIR"
33
+ fi
34
35
echo "Starting A0..."
36
python /a0/run_ui.py \
docker/run/fs/ins/install_A0.sh
+3
-3
@@ -2,7 +2,7 @@
2
3
BRANCH="development"
4
5
-git clone -b "$BRANCH" "https://github.com/frdel/agent-zero" "/a0"
5
+git clone -b "$BRANCH" "https://github.com/frdel/agent-zero" "/git/agent-zero"
6
7
# Create and activate Python virtual environment
8
python3 -m venv /opt/venv
@@ -15,7 +15,7 @@ pip install --upgrade pip ipython requests
15
pip install torch --index-url https://download.pytorch.org/whl/cpu
16
17
# Install remaining A0 python packages
18
-pip install -r /a0/requirements.txt
18
+pip install -r /github/agent-zero/requirements.txt
19
20
# Preload A0
21
-python /a0/preload.py
21
+python /github/agent-zero/preload.py
docker/run/fs/ins/install_A02.sh
+6
-16
@@ -1,21 +1,11 @@
1
#!/bin/bash
2
3
-BRANCH="development"
3
+# cachebuster script, this helps speed up docker builds
4
+rm -rf /github/agent-zero
5
5
-git clone -b "$BRANCH" "https://github.com/frdel/agent-zero" "/a0"
6
+# run the original install script again
7
+bash /ins/install_A0.sh
8
7
-# Create and activate Python virtual environment
8
-python3 -m venv /opt/venv
9
+# remove python packages cache
10
source /opt/venv/bin/activate
10
-
11
-# Ensure the virtual environment and pip setup
12
-pip install --upgrade pip ipython requests
13
-
14
-# Install some packages in specific variants
15
-pip install torch --index-url https://download.pytorch.org/whl/cpu
16
-
17
-# Install remaining A0 python packages
18
-pip install -r /a0/requirements.txt
19
-
20
-# Preload A0
21
-python /a0/preload.py
11
+pip cache purge
\ No newline at end of file