Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Change GHA; Remove Docker Python compile
Tomas Valenta7d50e1292328
diff --git a/.github/workflows/api.yml b/.github/workflows/api.ymlindex 111907195..92c786bd3 100644--- a/.github/workflows/api.yml+++ b/.github/workflows/api.yml@@ -1,4 +1,4 @@-name: Build and deploy API+name: Build and Deploy API to Google Compute Engineon:push:@@ -16,10 +16,13 @@ permissions:contents: readenv:- IMAGE_TAG: us-central1-docker.pkg.dev/${{ secrets.GCE_PROJECT }}/services/e2b-api:latest+ IMAGE_TAG: us-central1-docker.pkg.dev/devbookhq/services/e2b-api:latest+ GCE_INSTANCE: e2b-api-instance-1+ GCE_INSTANCE_ZONE: us-central1-a+# TODO: Update - https://stackoverflow.com/questions/68244641/how-to-circumvent-compute-engines-downtime-during-container-deploymentsjobs:- release:+ deploy:name: Build and releaseruns-on: ubuntu-20.04steps:@@ -47,8 +50,15 @@ jobs:cache-from: type=gha,scope=e2b-apicache-to: type=gha,scope=e2b-api- - name: Deploy- uses: google-github-actions/deploy-cloudrun@v1- with:- service: e2b-api- image: ${{ env.IMAGE_TAG }}+ - name: Delete old docker images from the instance+ run: |-+ gcloud compute instances add-metadata "$GCE_INSTANCE" \+ --zone "$GCE_INSTANCE_ZONE" \+ --metadata startup-script="#! /bin/bash+ docker image prune -af"++ - name: Update the server container+ run: |-+ gcloud compute instances update-container "$GCE_INSTANCE" \+ --zone "$GCE_INSTANCE_ZONE" \+ --container-image "$IMAGE_TAG"diff --git a/api-service/Dockerfile b/api-service/Dockerfileindex 3d8e99edf..746daef09 100644--- a/api-service/Dockerfile+++ b/api-service/Dockerfile@@ -30,7 +30,7 @@ WORKDIR /appCOPY pyproject.toml poetry.lock ./RUN --mount=type=cache,target=/home/.cache/pypoetry/cache \--mount=type=cache,target=/home/.cache/pypoetry/artifacts \- poetry install --with deploy --no-root --no-ansi --no-interaction --compile+ poetry install --with deploy --no-root --no-ansi --no-interactionCOPY . ./RUN rm -rf ./playground