Skip to content

Commit d92b012

Browse files
committed
update docker files
1 parent 992fc34 commit d92b012

File tree

3 files changed

+63
-20
lines changed

3 files changed

+63
-20
lines changed

Docker/Evaluate.Dockerfile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22
FROM python:3.10-slim
33

44
# install git, g++ and python3-tk
5-
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base libgdal-dev
5+
RUN apt-get update && apt-get install -y \
6+
git \
7+
g++ \
8+
python3-tk \
9+
zip \
10+
unzip \
11+
procps \
12+
r-base \
13+
libgdal-dev \
14+
# Add these new dependencies for matplotlib
15+
libfreetype6-dev \
16+
libpng-dev \
17+
pkg-config \
18+
python3-dev \
19+
python3-matplotlib \
20+
&& rm -rf /var/lib/apt/lists/*
621

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

34+
RUN pip install numpy==1.24.3 pyarrow==14.0.1
35+
1936
RUN cd /bigcodebench && \
2037
pip install . --no-deps && \
2138
pip install \
@@ -29,16 +46,17 @@ RUN cd /bigcodebench && \
2946
tree_sitter_languages>=1.10.2 \
3047
tree-sitter==0.21.3 \
3148
wget>=3.2 \
32-
datasets \
3349
gradio-client \
34-
numpy \
3550
rich
3651

52+
RUN pip install -I --timeout 2000 -r https://raw.githubusercontent.com/bigcode-project/bigcodebench/refs/heads/main/Requirements/requirements-eval.txt
53+
54+
# Ensure the numpy version is compatible with the datasets version
55+
RUN pip install datasets==2.17.0
56+
3757
# Pre-install the dataset
3858
RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
3959

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

4462
RUN chown -R bigcodebenchuser:bigcodebenchuser /app

Docker/Gradio.Dockerfile

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22
FROM python:3.10-slim
33

44
# install git, g++ and python3-tk
5-
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base libgdal-dev
6-
5+
RUN apt-get update && apt-get install -y \
6+
git \
7+
g++ \
8+
python3-tk \
9+
zip \
10+
unzip \
11+
procps \
12+
r-base \
13+
libgdal-dev \
14+
# Add these new dependencies for matplotlib
15+
libfreetype6-dev \
16+
libpng-dev \
17+
pkg-config \
18+
python3-dev \
19+
python3-matplotlib \
20+
&& rm -rf /var/lib/apt/lists/*
721
# upgrade to latest pip
822
RUN pip install --upgrade pip
923

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

35+
36+
RUN pip install numpy==1.24.3 pyarrow==14.0.1
37+
2138
RUN cd /bigcodebench && \
2239
pip install . --no-deps && \
2340
pip install \
@@ -31,16 +48,17 @@ RUN cd /bigcodebench && \
3148
tree_sitter_languages>=1.10.2 \
3249
tree-sitter==0.21.3 \
3350
wget>=3.2 \
34-
datasets \
3551
gradio-client \
36-
numpy \
3752
rich
3853

39-
# Pre-install the dataset
40-
RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
41-
4254
RUN pip install -I --timeout 2000 -r https://raw.githubusercontent.com/bigcode-project/bigcodebench/refs/heads/main/Requirements/requirements-eval.txt
4355

56+
# Ensure the numpy version is compatible with the datasets version
57+
RUN pip install datasets==2.17.0
58+
59+
# Pre-install the dataset
60+
RUN python -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
61+
4462
RUN apt-get update && \
4563
apt-get install -y \
4664
bash \

release_docker.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,19 @@ fi
2020

2121
export PYTHONPATH=$PWD pytest tests
2222

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

28-
docker build -f Docker/Gradio.Dockerfile . -t bigcodebench/bigcodebench-gradio:$version
29-
docker tag bigcodebench/bigcodebench-gradio:$version bigcodebench/bigcodebench-gradio:latest
30-
docker push bigcodebench/bigcodebench-gradio:$version
31-
docker push bigcodebench/bigcodebench-gradio:latest
26+
# Build and push evaluate image
27+
docker buildx build --platform linux/amd64 \
28+
-f Docker/Evaluate.Dockerfile . \
29+
-t bigcodebench/bigcodebench-evaluate:$version \
30+
-t bigcodebench/bigcodebench-evaluate:latest \
31+
--push
32+
33+
# Build and push gradio image
34+
docker buildx build --platform linux/amd64 \
35+
-f Docker/Gradio.Dockerfile . \
36+
-t bigcodebench/bigcodebench-gradio:$version \
37+
-t bigcodebench/bigcodebench-gradio:latest \
38+
--push

0 commit comments

Comments
 (0)