From db50874b52bd4e8d440e224928fab6b12a6723f6 Mon Sep 17 00:00:00 2001 From: Hiroshi Fujita Date: Tue, 7 Jan 2025 15:17:24 +0000 Subject: [PATCH 1/2] fix: restrict poetry installation to version <2.0.0 in post-create script --- .devcontainer/post_create_command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/post_create_command.sh b/.devcontainer/post_create_command.sh index e80f9d30aadc02..7fb70dcfba3548 100755 --- a/.devcontainer/post_create_command.sh +++ b/.devcontainer/post_create_command.sh @@ -1,7 +1,7 @@ #!/bin/bash cd web && npm install -pipx install poetry +pipx install 'poetry<2.0.0' echo 'alias start-api="cd /workspaces/dify/api && poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc echo 'alias start-worker="cd /workspaces/dify/api && poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion"' >> ~/.bashrc From 9d2d2592c3593b973d974547333f40b568893c69 Mon Sep 17 00:00:00 2001 From: Hiroshi Fujita Date: Tue, 7 Jan 2025 15:18:16 +0000 Subject: [PATCH 2/2] fix: update post-create and post-start scripts for dependency installation and environment setup --- .devcontainer/post_create_command.sh | 1 - .devcontainer/post_start_command.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/post_create_command.sh b/.devcontainer/post_create_command.sh index 7fb70dcfba3548..23a8a1a83f6175 100755 --- a/.devcontainer/post_create_command.sh +++ b/.devcontainer/post_create_command.sh @@ -1,6 +1,5 @@ #!/bin/bash -cd web && npm install pipx install 'poetry<2.0.0' echo 'alias start-api="cd /workspaces/dify/api && poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc diff --git a/.devcontainer/post_start_command.sh b/.devcontainer/post_start_command.sh index 56e87614babf90..51c6f31cf05883 100755 --- a/.devcontainer/post_start_command.sh +++ b/.devcontainer/post_start_command.sh @@ -1,3 +1,4 @@ #!/bin/bash -cd api && poetry install \ No newline at end of file +cd /workspaces/dify/web && npm install +cd /workspaces/dify/api && poetry env use 3.12 && poetry install