Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize evaluation #4

Open
wants to merge 4 commits into
base: eval
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**

!README.md
!setup.py
!pyproject.toml
!setup.cfg
!environment.yml
!/swebench/
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:20.04
FROM ubuntu:jammy

# https://github.com/princeton-nlp/SWE-bench/issues/15#issuecomment-1815392192
RUN apt-get update && \
apt-get install -y bash gcc git jq wget && \
apt-get install -y bash gcc git jq wget g++ make libffi-dev python3.11 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -11,10 +11,13 @@ RUN git config --global user.name "swebench"

RUN apt update && apt install -y build-essential

RUN ln -sfn /bin/bash /bin/sh

# Create new user
RUN useradd -ms /bin/bash swe-bench
USER swe-bench
WORKDIR /home/swe-bench
RUN chown -R swe-bench:swe-bench /home/swe-bench

# Setup Conda
ENV PATH="/home/swe-bench/miniconda3/bin:${PATH}"
Expand All @@ -23,13 +26,19 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -
&& mkdir ~/.conda \
&& bash miniconda.sh -b \
&& rm -f miniconda.sh
RUN conda --version
RUN conda --version \
&& conda init bash \
&& conda config --append channels conda-forge

# Setup SWE-Bench Env
COPY environment.yml .
RUN conda env create -f environment.yml

# Some missing packages
RUN pip install datasets python-dotenv gitpython
RUN pip install datasets python-dotenv gitpython unidiff rich importlib

# Install SWE-Bench
COPY . .
RUN pip install -e .

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: swe-bench
dependencies:
- python=3.9
- python=3.11
- pip
- pip:
- datasets
Expand Down