swe.Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. # Cache python versions
  33. RUN conda create -y -n python3.9 python=3.9
  34. RUN conda create -y -n python3.10 python=3.10
  35. # Install python packages
  36. COPY docker/requirements.txt /root/requirements.txt
  37. RUN pip install -r /root/requirements.txt
  38. WORKDIR /
  39. CMD ["/bin/bash"]