diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..78e31d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +** + +!README.md +!setup.py +!pyproject.toml +!setup.cfg +!environment.yml +!/swebench/ diff --git a/Dockerfile b/Dockerfile index 2378da1..5d99862 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/* @@ -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}" @@ -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"] diff --git a/environment.yml b/environment.yml index a64aa6c..3eb4697 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,6 @@ name: swe-bench dependencies: - - python=3.9 + - python=3.11 - pip - pip: - datasets