Dockerfile 987 B

12345678910111213141516171819202122232425262728293031323334353637
  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. # Some missing packages
  26. RUN pip install datasets python-dotenv gitpython
  27. RUN conda init bash
  28. CMD ["/bin/bash"]