Talor Abramovich 5a48368927 documentation of enigma usage | 1 month ago | |
---|---|---|
.. | ||
ghidra_scripts | 3 months ago | |
README.md | 6 months ago | |
ctf_requirements.txt | 1 month ago | |
enigma.Dockerfile | 1 month ago | |
getconda.sh | 6 months ago | |
number_theory__fixed | 1 month ago | |
requirements.txt | 3 months ago | |
swe.Dockerfile | 4 months ago |
To ensure reproducibility and sandboxed execution of SWE-agent actions across systems, we adopt practices established in prior work and use 🐋 Docker containers to carry out SWE-agent inference.
swe.Dockerfile
file is the customized image written for the environment of SWE-agent../setup.sh
script automatically builds this image.run.py
is invoked, containers are automatically created from the built image.
Here, we explain what each line in swe.Dockerfile
does:
Base Image: Start from the latest version of the Ubuntu image.
FROM ubuntu:latest
MINICONDA_URL
that will be used to specify the Miniconda installer URL during the build process.
bash
ARG MINICONDA_URL
Install Third-Party Tools: Update the package lists for the Ubuntu package manager and install several essential development tools. Clean up after the installation.
RUN apt-get update && \
apt-get install -y bash gcc git jq wget g++ make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
bash
RUN git config --global user.email "sweagent@pnlp.org"
RUN git config --global user.name "sweagent"
Environment Variables: Set the ROOT
environment variable and customize the shell prompt.
ENV ROOT='/dev/'
RUN prompt() { echo " > "; };
ENV PS1="> "
bash
RUN touch /root/files_to_edit.txt
RUN touch /root/test.patch
Enhance ls
Command: Modify the .bashrc
file to alias the ls
command.
RUN echo "alias ls='ls -F'" >> /root/.bashrc
conda-forge
to the channels list.
bash
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
RUN wget ${MINICONDA_URL} -O miniconda.sh \
&& mkdir /root/.conda \
&& bash miniconda.sh -b \
&& rm -f miniconda.sh
RUN conda --version \
&& conda init bash \
&& conda config --append channels conda-forge
Install Python Packages: Copy the requirements.txt
file into the image and install the specified Python packages.
COPY docker/requirements.txt /root/requirements.txt
RUN pip install -r /root/requirements.txt
bash
WORKDIR /
Default Command: Set the default command to open a Bash shell when the container starts.
CMD ["/bin/bash"]