Dockerfile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. FROM ubuntu:20.04
  2. # https://github.com/princeton-nlp/SWE-bench/issues/15#issuecomment-1815392192
  3. RUN apt-get update && \
  4. apt-get install -y bash gcc git jq wget && \
  5. apt-get clean && \
  6. rm -rf /var/lib/apt/lists/*
  7. RUN git config --global user.email "swebench@pnlp.org"
  8. RUN git config --global user.name "swebench"
  9. RUN apt update && apt install -y build-essential
  10. # Create new user
  11. RUN useradd -ms /bin/bash swe-bench
  12. USER swe-bench
  13. WORKDIR /home/swe-bench
  14. # Setup Conda
  15. ENV PATH="/home/swe-bench/miniconda3/bin:${PATH}"
  16. ARG PATH="/home/swe-bench/miniconda3/bin:${PATH}"
  17. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-`uname -m`.sh -O miniconda.sh \
  18. && mkdir ~/.conda \
  19. && bash miniconda.sh -b \
  20. && rm -f miniconda.sh
  21. RUN conda --version
  22. # Setup SWE-Bench Env
  23. COPY environment.yml .
  24. RUN conda env create -f environment.yml
  25. # Add commands
  26. COPY ./commands.sh .
  27. RUN source commands.sh
  28. # Some missing packages
  29. RUN pip install datasets python-dotenv gitpython
  30. RUN conda init bash
  31. CMD ["/bin/bash"]