From acafef1fd1bb29c62397277cd864080dd6d3cfe1 Mon Sep 17 00:00:00 2001 From: Tsz-Yeung Lau <57053441+anson70242@users.noreply.github.com> Date: Wed, 12 Nov 2025 16:43:26 +0900 Subject: [PATCH 1/4] Include Docker setup instructions in README Added Docker installation instructions for running experiments. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 71d7f3a..ab2812a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,19 @@ pip install torch==1.11.0 pip install -r requirements.txt ``` +- If you prefer Docker (requires Docker Engine and NVIDIA Container Toolkit): +```bash +# 1. Build the image (run from the directory containing the Dockerfile) +docker build -t d3r . + +# 2. Run the experiment +# (Ensure your downloaded datasets are in this directory for the mount to work) +docker run --rm --gpus all \ + -v .:/app/data \ + d3r \ + /bin/bash -c "bash ./script/run.sh" +``` + 2. Download data. You can obtain two benchmarks from [Google Cloud](https://drive.google.com/drive/folders/1UJ6SGfb6h-9R0L18FLDXpISKh1nhaqWA?usp=sharing). The datasets are well pre-processed. For the SWaT dataset, you can apply for it by following its [official tutorial](https://itrust.sutd.edu.sg/itrust-labs_datasets/dataset_info/). We unify the SWaT dataset to minute granularity and retain only continuous metrics: ``` From 0f53eb3e78584641b96b496d6e4a90103492a93e Mon Sep 17 00:00:00 2001 From: Tsz-Yeung Lau <57053441+anson70242@users.noreply.github.com> Date: Wed, 12 Nov 2025 16:43:59 +0900 Subject: [PATCH 2/4] Create Dockerfile for PyTorch environment Set up a Dockerfile for a PyTorch project with necessary packages. --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c8581b0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# 1. Base Image: +# - PyTorch 1.11.0 +# - CUDA 11.3 (The corresponding version for torch 1.11.0) +# - Python 3.9.12 (Closest available to 3.9.13) +FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime + +# 2. Set Working Directory +WORKDIR /app + +# 3. (CRITICAL!) Package Installation +# We are avoiding installing directly from a local 'requirements.txt' +# because it often causes Python version conflicts (specifically with Python 3.9) +# due to pre-compiled binaries or version lock issues. +# Instead, we directly install the core packages needed for the project, +# allowing pip to automatically select compatible versions for this environment. +RUN pip install --no-cache-dir \ + numpy \ + pandas \ + scikit-learn \ + matplotlib + +# 4. Copy all project files +COPY . . + +# 5. Default command: Start bash shell +CMD ["/bin/bash"] From 57053cfeebfcfebeb6506403e75c824bc84dc42b Mon Sep 17 00:00:00 2001 From: Tsz-Yeung Lau <57053441+anson70242@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:05:17 +0900 Subject: [PATCH 3/4] Modify Docker command in README.md Updated Docker run command in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab2812a..eb6d64e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ docker build -t d3r . docker run --rm --gpus all \ -v .:/app/data \ d3r \ - /bin/bash -c "bash ./script/run.sh" + /bin/bash ``` 2. Download data. You can obtain two benchmarks from [Google Cloud](https://drive.google.com/drive/folders/1UJ6SGfb6h-9R0L18FLDXpISKh1nhaqWA?usp=sharing). The datasets are well pre-processed. For the SWaT dataset, you can apply for it by following its [official tutorial](https://itrust.sutd.edu.sg/itrust-labs_datasets/dataset_info/). We unify the SWaT dataset to minute granularity and retain only continuous metrics: From 0665cb3d06d3da5f6b8cb1cc088f04213314e432 Mon Sep 17 00:00:00 2001 From: Tsz-Yeung Lau <57053441+anson70242@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:10:07 +0900 Subject: [PATCH 4/4] Fix Docker run command for interactive mode --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb6d64e..0f92475 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ docker build -t d3r . # 2. Run the experiment # (Ensure your downloaded datasets are in this directory for the mount to work) -docker run --rm --gpus all \ +docker run --rm -it --gpus all \ -v .:/app/data \ d3r \ /bin/bash