Skip to content

Commit

Permalink
update docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
terryyz committed Dec 12, 2024
1 parent 992fc34 commit d92b012
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 20 deletions.
28 changes: 23 additions & 5 deletions Docker/Evaluate.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
FROM python:3.10-slim

# install git, g++ and python3-tk
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base libgdal-dev
RUN apt-get update && apt-get install -y \
git \
g++ \
python3-tk \
zip \
unzip \
procps \
r-base \
libgdal-dev \
# Add these new dependencies for matplotlib
libfreetype6-dev \
libpng-dev \
pkg-config \
python3-dev \
python3-matplotlib \
&& rm -rf /var/lib/apt/lists/*

# upgrade to latest pip
RUN pip install --upgrade pip
Expand All @@ -16,6 +31,8 @@ RUN rm -rf /bigcodebench
ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench

RUN pip install numpy==1.24.3 pyarrow==14.0.1

RUN cd /bigcodebench && \
pip install . --no-deps && \
pip install \
Expand All @@ -29,16 +46,17 @@ RUN cd /bigcodebench && \
tree_sitter_languages>=1.10.2 \
tree-sitter==0.21.3 \
wget>=3.2 \
datasets \
gradio-client \
numpy \
rich

RUN pip install -I --timeout 2000 -r https://raw.githubusercontent.com/bigcode-project/bigcodebench/refs/heads/main/Requirements/requirements-eval.txt

# Ensure the numpy version is compatible with the datasets version
RUN pip install datasets==2.17.0

# Pre-install the dataset
RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"

RUN pip install -I --timeout 2000 -r https://raw.githubusercontent.com/bigcode-project/bigcodebench/refs/heads/main/Requirements/requirements-eval.txt

WORKDIR /app

RUN chown -R bigcodebenchuser:bigcodebenchuser /app
Expand Down
32 changes: 25 additions & 7 deletions Docker/Gradio.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
FROM python:3.10-slim

# install git, g++ and python3-tk
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base libgdal-dev

RUN apt-get update && apt-get install -y \
git \
g++ \
python3-tk \
zip \
unzip \
procps \
r-base \
libgdal-dev \
# Add these new dependencies for matplotlib
libfreetype6-dev \
libpng-dev \
pkg-config \
python3-dev \
python3-matplotlib \
&& rm -rf /var/lib/apt/lists/*
# upgrade to latest pip
RUN pip install --upgrade pip

Expand All @@ -18,6 +32,9 @@ RUN rm -rf /bigcodebench
ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench


RUN pip install numpy==1.24.3 pyarrow==14.0.1

RUN cd /bigcodebench && \
pip install . --no-deps && \
pip install \
Expand All @@ -31,16 +48,17 @@ RUN cd /bigcodebench && \
tree_sitter_languages>=1.10.2 \
tree-sitter==0.21.3 \
wget>=3.2 \
datasets \
gradio-client \
numpy \
rich

# Pre-install the dataset
RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"

RUN pip install -I --timeout 2000 -r https://raw.githubusercontent.com/bigcode-project/bigcodebench/refs/heads/main/Requirements/requirements-eval.txt

# Ensure the numpy version is compatible with the datasets version
RUN pip install datasets==2.17.0

# Pre-install the dataset
RUN python -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"

RUN apt-get update && \
apt-get install -y \
bash \
Expand Down
23 changes: 15 additions & 8 deletions release_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ fi

export PYTHONPATH=$PWD pytest tests

docker build -f Docker/Evaluate.Dockerfile . -t bigcodebench/bigcodebench-evaluate:$version
docker tag bigcodebench/bigcodebench-evaluate:$version bigcodebench/bigcodebench-evaluate:latest
docker push bigcodebench/bigcodebench-evaluate:$version
docker push bigcodebench/bigcodebench-evaluate:latest
docker buildx create --name multiplatform-builder --use || true
docker buildx use multiplatform-builder

docker build -f Docker/Gradio.Dockerfile . -t bigcodebench/bigcodebench-gradio:$version
docker tag bigcodebench/bigcodebench-gradio:$version bigcodebench/bigcodebench-gradio:latest
docker push bigcodebench/bigcodebench-gradio:$version
docker push bigcodebench/bigcodebench-gradio:latest
# Build and push evaluate image
docker buildx build --platform linux/amd64 \
-f Docker/Evaluate.Dockerfile . \
-t bigcodebench/bigcodebench-evaluate:$version \
-t bigcodebench/bigcodebench-evaluate:latest \
--push

# Build and push gradio image
docker buildx build --platform linux/amd64 \
-f Docker/Gradio.Dockerfile . \
-t bigcodebench/bigcodebench-gradio:$version \
-t bigcodebench/bigcodebench-gradio:latest \
--push

0 comments on commit d92b012

Please sign in to comment.