Skip to content

Commit 1900883

Browse files
committed
Test pipeline
1 parent 1934ce7 commit 1900883

File tree

3 files changed

+66
-76
lines changed

3 files changed

+66
-76
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- main
6+
- beta-split-package
77

88
concurrency: ${{ github.workflow }}-${{ github.ref }}
99

@@ -187,75 +187,3 @@ jobs:
187187
steps:
188188
- name: Checkout Repo
189189
uses: actions/checkout@v3
190-
191-
- name: Set up Python
192-
uses: actions/setup-python@v4
193-
with:
194-
python-version: "3.8"
195-
196-
- name: Install and configure Poetry
197-
uses: snok/install-poetry@v1
198-
with:
199-
version: 1.8.1
200-
virtualenvs-create: true
201-
virtualenvs-in-project: true
202-
installer-parallel: true
203-
204-
- uses: pnpm/action-setup@v3
205-
with:
206-
version: 9.5
207-
208-
- name: Setup Node.js 18
209-
uses: actions/setup-node@v3
210-
with:
211-
node-version: '18.x'
212-
cache: pnpm
213-
214-
- name: Configure pnpm
215-
run: |
216-
pnpm config set auto-install-peers true
217-
pnpm config set exclude-links-from-lockfile true
218-
219-
- name: Install dependencies
220-
run: pnpm install --frozen-lockfile
221-
222-
- name: Create new versions
223-
run: pnpm run version
224-
env:
225-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
226-
227-
- name: Release new versions
228-
uses: changesets/action@v1
229-
with:
230-
publish: pnpm run publish
231-
createGithubReleases: true
232-
env:
233-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
235-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
236-
237-
- name: Update lock file
238-
run: pnpm i --no-link --no-frozen-lockfile
239-
240-
- name: Commit new versions
241-
run: |
242-
git config user.name "github-actions[bot]"
243-
git config user.email "github-actions[bot]@users.noreply.github.com"
244-
git commit -am "[skip ci] Release new versions" || exit 0
245-
git push
246-
env:
247-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
248-
249-
report-failure:
250-
needs: [python-tests, js-tests, release]
251-
if: failure()
252-
name: Code Interpreter Release Failed - Slack Notification
253-
runs-on: ubuntu-latest
254-
steps:
255-
- name: Release Failed - Slack Notification
256-
uses: rtCamp/action-slack-notify@v2
257-
env:
258-
SLACK_COLOR: "#ff0000"
259-
SLACK_MESSAGE: ":here-we-go-again: :bob-the-destroyer: We need :fix-parrot: ASAP :pray:"
260-
SLACK_TITLE: Code Interpreter Release Failed
261-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

template/e2b.Dockerfile

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
FROM e2bdev/code-interpreter:latest
1+
FROM python:3.10.14
2+
3+
ENV JAVA_HOME=/opt/java/openjdk
4+
ENV PATH="${JAVA_HOME}/bin:${PATH}"
5+
6+
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
7+
build-essential curl git util-linux jq sudo nodejs npm
8+
9+
ENV PIP_DEFAULT_TIMEOUT=100 \
10+
PIP_DISABLE_PIP_VERSION_CHECK=1 \
11+
PIP_NO_CACHE_DIR=1 \
12+
JUPYTER_CONFIG_PATH="/root/.jupyter" \
13+
IPYTHON_CONFIG_PATH="/root/.ipython" \
14+
SERVER_PATH="/root/.server"
15+
16+
# Install Jupyter
17+
COPY ./requirements.txt requirements.txt
18+
RUN pip install --no-cache-dir -r requirements.txt && ipython kernel install --name "python3" --user
19+
20+
# R Kernel
21+
RUN apt-get update && apt-get install -y r-base
22+
RUN R -e "install.packages('IRkernel')"
23+
RUN R -e "IRkernel::installspec(user = FALSE, name = 'r', displayname = 'R')"
24+
25+
# Javascript Kernel
26+
RUN npm install -g node-gyp
27+
RUN npm install -g --unsafe-perm ijavascript
28+
RUN ijsinstall --install=global
29+
30+
# Bash Kernel
31+
RUN pip install bash_kernel
32+
RUN python -m bash_kernel.install
33+
34+
# Create separate virtual environment for server
35+
RUN python -m venv $SERVER_PATH/.venv
36+
37+
# Copy server and its requirements
38+
RUN mkdir -p $SERVER_PATH/
39+
COPY ./server/requirements.txt $SERVER_PATH
40+
RUN $SERVER_PATH/.venv/bin/pip install --no-cache-dir -r $SERVER_PATH/requirements.txt
41+
COPY ./server $SERVER_PATH
42+
43+
# Copy Jupyter configuration
44+
COPY ./start-up.sh $JUPYTER_CONFIG_PATH/
45+
RUN chmod +x $JUPYTER_CONFIG_PATH/start-up.sh
46+
47+
COPY ./jupyter_server_config.py $JUPYTER_CONFIG_PATH/
48+
49+
RUN mkdir -p $IPYTHON_CONFIG_PATH/profile_default
50+
COPY ipython_kernel_config.py $IPYTHON_CONFIG_PATH/profile_default/
51+
52+
RUN mkdir -p $IPYTHON_CONFIG_PATH/profile_default/startup
53+
COPY startup_scripts/* $IPYTHON_CONFIG_PATH/profile_default/startup
54+
55+
56+
COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME
57+
# Java Kernel
58+
RUN wget https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip && \
59+
unzip ijava-1.3.0.zip && \
60+
python install.py --sys-prefix
61+
62+
# Setup entrypoint for local development
63+
ENTRYPOINT $JUPYTER_CONFIG_PATH/start-up.sh

template/e2b.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ team_id = "460355b3-4f64-48f9-9a16-4442817f79f5"
1313
memory_mb = 1_024
1414
start_cmd = "/root/.jupyter/start-up.sh"
1515
dockerfile = "e2b.Dockerfile"
16-
template_name = "code-interpreter-v1"
17-
template_id = "nlhz8vlwyupq845jsdg9"
16+
template_name = "code-interpreter-test"
17+
template_id = "d31ost2c0skcbtrbg57c"

0 commit comments

Comments
 (0)