diff --git a/.ci/Dockerfile b/.ci/Dockerfile deleted file mode 100644 index fedf3e36f0..0000000000 --- a/.ci/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ -######################################################### -## Python Environment with CUDA -######################################################### -ARG HTTP_PROXY -ARG HTTPS_PROXY -ARG NO_PROXY - -FROM nvidia/cuda:12.4.0-devel-ubuntu20.04 AS python_base_cuda -LABEL maintainer="Anomalib Development Team" - -# Setup proxies - -ENV http_proxy=$HTTP_PROXY -ENV https_proxy=$HTTPS_PROXY -ENV no_proxy=$NO_PROXY -ENV DEBIAN_FRONTEND="noninteractive" - -# Update system and install wget -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - curl \ - wget \ - ffmpeg \ - libpython3.10 \ - npm \ - pandoc \ - ruby \ - software-properties-common && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Install latest git for github actions -RUN add-apt-repository ppa:git-core/ppa &&\ - apt-get update && \ - apt-get install --no-install-recommends -y git &&\ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Prettier requires atleast nodejs 10 and actions/checkout requires nodejs 16 -RUN curl -sL https://deb.nodesource.com/setup_current.x > nodesetup.sh && \ - bash - nodesetup.sh && \ - apt-get install --no-install-recommends -y nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Create a non-root user -RUN useradd -m user -USER user - -# Install Conda -RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > ~/miniconda.sh -s && \ - bash ~/miniconda.sh -b -p /home/user/conda && \ - rm ~/miniconda.sh -ENV PATH "/home/user/conda/bin:${PATH}" -RUN conda install python=3.10 - - -######################################################### -## Anomalib Development Env -######################################################### - -FROM python_base_cuda as anomalib_development_env - -# Install all anomalib requirements -COPY ./pyproject.toml /tmp/anomalib/pyproject.toml -RUN pip install --no-cache-dir .[full] - - -WORKDIR /home/user diff --git a/.ci/README.md b/.ci/README.md deleted file mode 100644 index e52163f734..0000000000 --- a/.ci/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Guide to Setting up the CI using the Docker images - -## Steps - -1. Build the docker image using the Dockerfile in the .ci directory. - Make sure you are in the root directory of `anomalib`. - - ```bash - sudo docker build --build-arg HTTP_PROXY="$http_proxy" --build-arg \ - HTTPS_PROXY="$https_proxy" --build-arg NO_PROXY="$no_proxy" \ - . -t anomalib-ci -f .ci/Dockerfile - ``` - - Here, `anomalib-ci` is the name of the image. - -1. Create and start a container - - ```bash - sudo docker run --gpus all \ - --shm-size=2G\ - -i -t --mount type=bind,source=,target=/home/user/datasets,readonly\ - -d --name anomalib-ci-container anomalib-ci - ``` - - Note: `--gpus all` is required for the container to have access to the GPUs. - `-d` flag ensure that the container is detached when it is created. - `mount` is required to ensure that tests have access to the dataset. - -1. Enter the container by - - ```bash - sudo docker exec -it anomalib-ci-container /bin/bash - ``` - -1. Install github actions runner in the container by navigating to [https://github.com/openvinotoolkit/anomalib/settings/actions/runners/new](https://github.com/openvinotoolkit/anomalib/settings/actions/runners/new) - - For example: - - ```bash - mkdir actions-runner && cd actions-runner - - curl -o actions-runner-linux-x64-2.296.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.296.1/actions-runner-linux-x64-2.296.1.tar.gz - - tar xzf ./actions-runner-linux-x64-2.296.1.tar.gz - - rm actions-runner-linux-x64-2.296.1.tar.gz - - ./config.sh --url https://github.com/openvinotoolkit/anomalib --token - ``` - - Follow the instructions on the screen to complete the installation. - -1. Now the container is ready. Type `exit` to leave the container. - -1. Start github actions runner in detached mode in the container and set the anomalib dataset and codecov environment - variables. The codecov token in the environment variable allows coverage report uploading from the forks. - - ```bash - sudo docker exec -d anomalib-ci-container /bin/bash -c \ - "export ANOMALIB_DATASET_PATH=/home/user/datasets;export CODECOV_TOKEN=XXX && /home/user/actions-runner/run.sh" - ``` diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 1fef54c46c..0000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,46 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/docker-existing-dockerfile -{ - "name": "Anomalib Development Environment", - // Sets the run context to one level up instead of the .devcontainer folder. - "context": "..", - // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. - "dockerFile": "../.ci/Dockerfile", - // Set *default* container specific settings.json values on container create. - "settings": { - "python.pythonPath": "/home/user/conda/bin/python", - "python.formatting.provider": "black", - "editor.formatOnSave": true, - "python.formatting.blackArgs": ["--line-length", "120"], - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": ["--max-line-length=120"], - "python.testing.cwd": ".", - "python.linting.lintOnSave": true, - "python.testing.unittestEnabled": false, - "python.testing.nosetestsEnabled": false, - "python.testing.pytestEnabled": true, - "python.testing.pytestArgs": ["tests"] - }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-python.python", - "njpwerner.autodocstring", - "streetsidesoftware.code-spell-checker", - "eamodio.gitlens", - "littlefoxteam.vscode-python-test-adapter" - ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Uncomment the next line to run commands after the container is created - for example installing curl. - // "postCreateCommand": "apt-get update && apt-get install -y curl", - // Uncomment when using a ptrace-based debugger like C++, Go, and Rust - "runArgs": ["--gpus=all", "--shm-size=20g"] - // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. - // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], - // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "vscode" -} diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index d1e00bca62..0000000000 --- a/.dockerignore +++ /dev/null @@ -1,14 +0,0 @@ -*.dot -.git -.idea -.pytest_cache -.tox -.vscode -__pycache__ -{toxworkdir} -datasets/ -embeddings/ -lightning_logs/ -lightning_test/ -papers/ -results/