From be55fce9be2efbaed3c1efff8ed6c186ebb0f3e0 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 16 Aug 2024 03:49:55 -0400 Subject: [PATCH] fix: devcontainer part 1 (#3254) `-r` fix and checkout within volume for performance Signed-off-by: Dave Lee --- .devcontainer/devcontainer.json | 3 ++- .devcontainer/docker-compose-devcontainer.yml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a111dbfdbb74..f82b62f976c5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -19,5 +19,6 @@ } }, "forwardPorts": [8080, 3000], - "postStartCommand": "make prepare && cp /build/backend-assets /workdir/backend-assets" + "postCreateCommand": "git clone https://github.com/mudler/LocalAI.git .", + "postStartCommand": "make prepare && cp -r /build/backend-assets /workdir/backend-assets" } \ No newline at end of file diff --git a/.devcontainer/docker-compose-devcontainer.yml b/.devcontainer/docker-compose-devcontainer.yml index e36492e9f0be..f7de406e84af 100644 --- a/.devcontainer/docker-compose-devcontainer.yml +++ b/.devcontainer/docker-compose-devcontainer.yml @@ -13,7 +13,7 @@ services: ports: - 8080:8080 volumes: - - ..:/workspace:cached + - localai_workspace:/workspace command: /bin/sh -c "while sleep 1000; do :; done" cap_add: - SYS_PTRACE @@ -42,4 +42,5 @@ services: volumes: - ./grafana:/etc/grafana/provisioning/datasources volumes: - prom_data: \ No newline at end of file + prom_data: + localai_workspace: \ No newline at end of file