swe.Dockerfile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM ubuntu:jammy
  2. ARG MINICONDA_URL
  3. # Install third party tools
  4. RUN apt-get update && \
  5. apt-get install -y bash gcc git jq wget g++ make && \
  6. apt-get clean && \
  7. rm -rf /var/lib/apt/lists/*
  8. # Initialize git
  9. RUN git config --global user.email "sweagent@pnlp.org"
  10. RUN git config --global user.name "sweagent"
  11. # Environment variables
  12. ENV ROOT='/dev/'
  13. RUN prompt() { echo " > "; };
  14. ENV PS1="> "
  15. # Create file for tracking edits, test patch
  16. RUN touch /root/files_to_edit.txt
  17. RUN touch /root/test.patch
  18. # add ls file indicator
  19. RUN echo "alias ls='ls -F'" >> /root/.bashrc
  20. # Install miniconda
  21. ENV PATH="/root/miniconda3/bin:${PATH}"
  22. ARG PATH="/root/miniconda3/bin:${PATH}"
  23. RUN wget ${MINICONDA_URL} -O miniconda.sh \
  24. && mkdir /root/.conda \
  25. && bash miniconda.sh -b \
  26. && rm -f miniconda.sh
  27. RUN conda --version \
  28. && conda init bash \
  29. && conda config --append channels conda-forge
  30. # Install python packages
  31. COPY docker/requirements.txt /root/requirements.txt
  32. RUN pip install -r /root/requirements.txt
  33. WORKDIR /
  34. CMD ["/bin/bash"]