From 8cdbf38c8cc15b4e4dd1adfff883cf7fe8f0f9ce Mon Sep 17 00:00:00 2001 From: Asia <2736300+humpydonkey@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:12:49 -0700 Subject: [PATCH] Remove e2b related code (#142) Remove e2b --- .dockerignore | 40 ------------------------------------- .github/workflows/ci_cd.yml | 10 ---------- e2b.toml | 17 ---------------- e2b/README.md | 5 ----- e2b/e2b.Dockerfile | 25 ----------------------- 5 files changed, 97 deletions(-) delete mode 100644 .dockerignore delete mode 100644 e2b.toml delete mode 100644 e2b/README.md delete mode 100644 e2b/e2b.Dockerfile diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 7cbb9224..00000000 --- a/.dockerignore +++ /dev/null @@ -1,40 +0,0 @@ -/dev-helpers -/docs -/swagger-ui-dist-package -/tests -/.mypy_cache -/design -/docs-build -/assets -/examples -/site -.env -.flake8 -mkdocs.yml - -# Ignore Python cache and bytecode files -**/__pycache__/ -*.pyc -*.pyo -*.pyd - -# Ignore Docker-related files -Dockerfile -.dockerignore - -# Ignore version control directories and files -.git/ -.gitignore -.gitattributes -.github - -# Ignore IDE and editor-specific files -.idea/ -.vscode/ -*.iml - -# Ignore build and dependency files -dist/ -build/ -*.egg-info/ -node_modules/ \ No newline at end of file diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e1801e4c..75c64236 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -84,13 +84,3 @@ jobs: run: | poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} poetry publish --build -vvv - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18.17.1 - - name: Install e2b CLI - run: npm install -g @e2b/cli@latest - - name: E2B Publish Sandbox Template - run: e2b template build -d e2b/e2b.Dockerfile -c "/root/.jupyter/start-up.sh" --cpu-count 2 --memory-mb 1024 - env: - E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }} \ No newline at end of file diff --git a/e2b.toml b/e2b.toml deleted file mode 100644 index e14e6ed7..00000000 --- a/e2b.toml +++ /dev/null @@ -1,17 +0,0 @@ -# This is a config for E2B sandbox template. -# You can use 'template_id' (nh8girnufdutxd6xvy00) or 'template_name (va-sandbox) from this config to spawn a sandbox: - -# Python SDK -# from e2b import Sandbox -# sandbox = Sandbox(template='va-sandbox') - -# JS SDK -# import { Sandbox } from 'e2b' -# const sandbox = await Sandbox.create({ template: 'va-sandbox' }) - -template_id = "nh8girnufdutxd6xvy00" -dockerfile = "e2b/e2b.Dockerfile" -template_name = "va-sandbox" -start_cmd = "/root/.jupyter/start-up.sh" -cpu_count = 2 -memory_mb = 1_024 diff --git a/e2b/README.md b/e2b/README.md deleted file mode 100644 index e793512a..00000000 --- a/e2b/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Build and push image to e2b: - -```bash -e2b template build -d e2b/e2b.Dockerfile -c "/root/.jupyter/start-up.sh" --cpu-count 2 --memory-mb 1024 -``` diff --git a/e2b/e2b.Dockerfile b/e2b/e2b.Dockerfile deleted file mode 100644 index 3b6850e6..00000000 --- a/e2b/e2b.Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM e2bdev/code-interpreter:latest -ENV POETRY_HOME="/opt/poetry" -ENV PATH="$POETRY_HOME/bin:$PATH" -# Disable virtualenv creation for convenience -ENV POETRY_VIRTUALENVS_CREATE=false -# Check if startup_script.sh exists and modify it -RUN if [ -f /root/.jupyter/start-up.sh ]; then \ - sed -i '2i export PYTHONPATH=/home/user/app' /root/.jupyter/start-up.sh; \ - else \ - echo "Error: startup_script.sh does not exist" >&2; \ - exit 1; \ - fi -# Install system dependencies -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - curl ffmpeg vim build-essential \ - && rm -rf /var/lib/apt/lists/* - -# Install Poetry and Python dependencies -RUN curl -sSL https://install.python-poetry.org | python - -WORKDIR /home/user/app -# Copy only the dependencies definition to leverage Docker cache -COPY pyproject.toml poetry.lock /home/user/app/ -RUN poetry install --no-root --no-interaction --without dev -COPY . /home/user/app