swe.Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM ubuntu:jammy
  2. ARG TARGETARCH
  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. COPY docker/getconda.sh .
  24. RUN bash getconda.sh ${TARGETARCH} \
  25. && rm getconda.sh \
  26. && mkdir /root/.conda \
  27. && bash miniconda.sh -b \
  28. && rm -f miniconda.sh
  29. RUN conda --version \
  30. && conda init bash \
  31. && conda config --append channels conda-forge
  32. # Install python packages
  33. COPY docker/requirements.txt /root/requirements.txt
  34. RUN pip install -r /root/requirements.txt
  35. WORKDIR /
  36. CMD ["/bin/bash"]