-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from dbpunk-labs/feat/add_pip_docker
feat: add build package
- Loading branch information
Showing
19 changed files
with
119 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# .github/workflows/ci-cd.yml | ||
on: workflow_dispatch | ||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: self-hosted | ||
#runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: build packages | ||
run: | | ||
TAG=${GITHUB_REF/refs\/tags\//} | ||
VERSION=${TAG#*v} | ||
bash build_package.sh ${VERSION} | ||
- name: Publish Proto | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: proto/dist | ||
|
||
- name: Publish Kernel | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: kernel/dist | ||
|
||
- name: Publish Agent | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: agent/dist | ||
- name: Publish Chat | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: chat/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
setup( | ||
name="octopus_agent", | ||
version="0.1.2", | ||
version="0.1.1", | ||
description="Open source code interpreter agent for LLM", | ||
author="imotai", | ||
author_email="[email protected]", | ||
|
@@ -33,14 +33,12 @@ | |
install_requires=[ | ||
"octopus_proto", | ||
"octopus_kernel", | ||
"langchain>=0.0.227", | ||
"langchain>=0.0.286", | ||
"grpcio-tools>=1.57.0", | ||
"grpc-google-iam-v1>=0.12.6", | ||
"aiofiles", | ||
"pydantic", | ||
"python-dotenv", | ||
"openai", | ||
"aiosqlite", | ||
], | ||
entry_points={ | ||
"console_scripts": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /bin/sh | ||
# | ||
# build_package.sh | ||
|
||
|
||
|
||
WORKDIR=`pwd` | ||
echo "$1" | ||
sed -i -E 's/version\s*=\s*"[^"]*"/version="$1"/' proto/setup.py | ||
sed -i -E 's/version\s*=\s*"[^"]*"/version="$1"/' kernel/setup.py | ||
sed -i -E 's/version\s*=\s*"[^"]*"/version="$1"/' agent/setup.py | ||
sed -i -E 's/version\s*=\s*"[^"]*"/version="$1"/' chat/setup.py | ||
echo "the proto new version" | ||
python3 proto/setup.py --version | ||
echo "the kernel new version" | ||
python3 kernel/setup.py --version | ||
echo "the agent new version" | ||
python3 agent/setup.py --version | ||
echo "the chat new version" | ||
python3 chat/setup.py --version | ||
# build octopus proto package | ||
cd ${WORKDIR}/proto && make && python3 -m build | ||
# build octopus kernel package | ||
cd ${WORKDIR}/kernel && python3 -m build | ||
# build agent package | ||
cd ${WORKDIR}/agent && python3 -m build | ||
# build chat package | ||
cd ${WORKDIR}/chat && python3 -m build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM ubuntu | ||
RUN apt update | ||
RUN apt install -y python3 python3-pip | ||
RUN pip install -U octopus_agent octopus_kernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM octopus_base | ||
WORKDIR /agent | ||
VOLUME /agent | ||
ADD start_agent.sh /agent/ | ||
CMD ["bash", "/agent/start_agent.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
kernel: | ||
env_file: | ||
- kernel.env | ||
image: octopus_kernel:latest | ||
ports: | ||
- '9527:9527' | ||
agent: | ||
image: octopus_agent:latest | ||
env_file: | ||
- agent.env | ||
ports: | ||
- '9528:9528' | ||
depends_on: | ||
- kernel |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/sh | ||
# | ||
# install_package.sh | ||
|
||
WORKDIR=`pwd` | ||
cd ${WORKDIR}/proto && make && pip install . | ||
cd ${WORKDIR}/kernel && pip install . | ||
cd ${WORKDIR}/agent && pip install . | ||
cd ${WORKDIR}/chat && pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
setup( | ||
name="octopus_kernel", | ||
version="0.1.2", | ||
version="0.1.3", | ||
description="Open source code interpreter agent for LLM", | ||
author="imotai", | ||
author_email="[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
setup( | ||
name="octopus_proto", | ||
version="0.1.2", | ||
version="0.1.3", | ||
description="Open source code interpreter agent for LLM", | ||
author="imotai", | ||
author_email="[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters