Skip to content

Commit

Permalink
Merge pull request #87 from jakubno/make_wandbot_great_again
Browse files Browse the repository at this point in the history
Use code interpreter with python 3.12
  • Loading branch information
morganmcg1 authored Jan 9, 2025
2 parents d52c23d + c002c88 commit 67a7005
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions e2b.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Install dependencies and customize sandbox
FROM e2bdev/code-interpreter:latest
FROM e2bdev/code-interpreter:python-3.12.8

# Set working directory
WORKDIR /home/user
Expand All @@ -9,12 +9,6 @@ RUN apt-get update && apt-get install -y \
wget \
gpg \
libstdc++6 \
&& echo "deb http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 \
&& apt-get update \
&& apt-get install -y python3.12 python3.12-venv python3.12-dev \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \
&& update-alternatives --set python3 /usr/bin/python3.12 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -29,28 +23,22 @@ RUN git clone https://github.com/wandb/wandbot.git /home/user/wandbot && \

RUN pip install uv

# Set working directory
WORKDIR /home/user/wandbot

# Set LD_LIBRARY_PATH before running build.sh
RUN cd /home/user/wandbot && \
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH && \
RUN export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH && \
(bash build.sh || true)

RUN cd /home/user/wandbot && . wandbot_venv/bin/activate && uv pip install .
RUN cd /home/user/wandbot && . wandbot_venv/bin/activate && uv pip install poetry
RUN cd /home/user/wandbot && . wandbot_venv/bin/activate && poetry install
RUN uv pip install --system .
RUN poetry install

# Copy in the vector index
COPY temp_index/* /home/user/temp_index/

RUN cd /home/user/wandbot && \
. wandbot_venv/bin/activate && \
export INDEX_DIR=$(python -c 'from wandbot.configs.vectorstore_config import VectorStoreConfig; \
RUN export INDEX_DIR=$(python -c 'from wandbot.configs.vectorstore_config import VectorStoreConfig; \
index_dir = VectorStoreConfig().index_dir; \
print(index_dir, end="")') && \
mkdir -p $INDEX_DIR && \
cp -r /home/user/temp_index/* $INDEX_DIR/ && \
rm -rf /home/user/temp_index

# Ensure we're in the wandbot directory when container starts
WORKDIR /home/user


0 comments on commit 67a7005

Please sign in to comment.