SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Remove swe-agent dockerization (#1191)
Kilian Lieretcd890d8299a1
diff --git a/.dockerignore b/.dockerignoredeleted file mode 100644index 19f1c18f..00000000--- a/.dockerignore+++ /dev/null@@ -1,195 +0,0 @@-# Byte-compiled / optimized / DLL files-__pycache__/-*.py[cod]-*$py.class--# C extensions-*.so--# Distribution / packaging-.Python-build/-develop-eggs/-dist/-downloads/-eggs/-.eggs/-lib/-lib64/-parts/-sdist/-var/-wheels/-pip-wheel-metadata/-share/python-wheels/-*.egg-info/-.installed.cfg-*.egg-MANIFEST--# PyInstaller-# Usually these files are written by a python script from a template-# before PyInstaller builds the exe, so as to inject date/other infos into it.-*.manifest-*.spec--# Installer logs-pip-log.txt-pip-delete-this-directory.txt--# Unit test / coverage reports-htmlcov/-.tox/-.nox/-.coverage-.coverage.*-.cache-nosetests.xml-coverage.xml-*.cover-*.py,cover-.hypothesis/-.pytest_cache/--# Translations-*.mo-*.pot--# Django stuff:-*.log-local_settings.py-db.sqlite3-db.sqlite3-journal--# Flask stuff:-instance/-.webassets-cache--# Scrapy stuff:-.scrapy--# Sphinx documentation-docs/_build/--# PyBuilder-target/--# Jupyter Notebook-.ipynb_checkpoints--# IPython-profile_default/-ipython_config.py--# pyenv-.python-version--# pipenv-# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.-# However, in case of collaboration, if having platform-specific dependencies or dependencies-# having no cross-platform support, pipenv may install dependencies that don't work, or not-# install all needed dependencies.-#Pipfile.lock--# PEP 582; used by e.g. github.com/David-OConnor/pyflow-__pypackages__/--# Celery stuff-celerybeat-schedule-celerybeat.pid--# SageMath parsed files-*.sage.py--# Environments-.env-.venv-env/-venv/-ENV/-env.bak/-venv.bak/--# Spyder project settings-.spyderproject-.spyproject--# Rope project settings-.ropeproject--# mkdocs documentation-/site--# mypy-.mypy_cache/-.dmypy.json-dmypy.json--# Pyre type checker-.pyre/--# Mac files-*.DS_Store--# Custom-keys.cfg--# iPython Notebooks-*.ipynb--# Evaluation folders-results/-testbed/-temp/--# Ignore all YAML files in data/-data/*/ic-*-data/*/single-issues--# Fine tuning data-fine_tune/*.ipynb-fine_tune/subtasks/*.jsonl-temp*.jsonl--# Inspector-inspector/*.json--# Ignore all files in the private folder-private/--### Website--# dependencies-website/frontend/node_modules-website/frontend/package-lock.json-website/frontend/.pnp-*.pnp.js--# testing-website/frontend/coverage--# production-website/frontend/build--# misc-*.env.local-*.env.development.local-*.env.test.local-*.env.production.local-.api_key-*npm-debug.log*-*yarn-debug.log*-*yarn-error.log*---# demo yamls (for editing)-*.demo.yaml--# trajectory files-trajectories/**-!trajectories/demonstrations/**--.vscode/**--# PyCharm-.idea/diff --git a/Dockerfile b/Dockerfiledeleted file mode 100644index 2121c0f6..00000000--- a/Dockerfile+++ /dev/null@@ -1,24 +0,0 @@-FROM python:3.11--# Set the working directory-WORKDIR /app--# Install nodejs-RUN apt update && \- apt install -y nodejs npm && \- apt-get clean && \- rm -rf /var/lib/apt/lists/*--# Install Docker CLI using the official Docker installation script-RUN curl -fsSL https://get.docker.com -o get-docker.sh && \- sh get-docker.sh--# Copy the application code-# Do this last to take advantage of the docker layer mechanism-COPY . /app--# Install Python dependencies-RUN pip install -e '.'--# Install react dependencies ahead of time-RUN cd sweagent/frontend && npm installdiff --git a/release_dockerhub.sh b/release_dockerhub.shdeleted file mode 100755index 25e9c4c1..00000000--- a/release_dockerhub.sh+++ /dev/null@@ -1,64 +0,0 @@-#!/usr/bin/env bash--# This script builds the official docker images and pushes them to dockerhub-# after checking with the user.--# NOTE: To clear the buildx cache, run the following command:-# docker buildx prune --all or more specifically docker buildx rm <context_name>--# bash strict mode-set -euo pipefail--# Check if exactly one argument is supplied-if [ "$#" -ne 2 ]; then- echo "Usage: $0 <user> <version>" >&2- exit 1-fi--USER=${1}-VERSION_STR=${2}--if [[ -z "$USER" ]]; then- echo "User name cannot be empty" >&2- exit 3-fi-if [[ "$USER" != "sweagent" ]]; then- echo "Careful here! Even if the username isn't sweagent, swe-eval will still be built on top of the sweagent/swe-agent image." >&2- read -p "Do you want to proceed? (yes) " response- if [[ "${response}" != "yes" ]]; then- echo "Exiting..." >&2- exit 4- fi-fi---# The argument should be in the form of x.x.x where each x can be one or more digits-if [[ $VERSION_STR =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || [ "$VERSION_STR" = "latest" ]; then- echo "Validated version number"-else- echo "Argument must be 'latest' or in the form x.x.x, where x is one or more numbers." >&2- exit 2-fi---DOCKER_CONTEXT_NAME="sweagent-multiplatform"-docker buildx use "$DOCKER_CONTEXT_NAME" || docker buildx create --use --name "$DOCKER_CONTEXT_NAME"--on_error() {- echo "====> ERROR!!! IMPORTANT: Make sure that you've already pushed something to dockerhub or pushed the tag to github!" >&2-}-trap on_error ERR--echo "------------------------------------------"-echo "Building swe-agent"-echo "------------------------------------------"-docker buildx build --platform=linux/amd64,linux/arm64 -t ${USER}/swe-agent:${VERSION_STR} -f docker/swe.Dockerfile --push .-echo "🔥 swe-agent pushed to dockerhub"-echo "------------------------------------------"-echo "Building swe-agent-run"-echo "------------------------------------------"-docker buildx build --platform=linux/amd64,linux/arm64 -t ${USER}/swe-agent-run:${VERSION_STR} --push .-echo "🔥 swe-agent-run pushed to dockerhub"-echo "------------------------------------------"-echo "Building of all images done"-echo "------------------------------------------"