Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -it --gpus all \
-v .:/app/data \
d3r \
/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:

```
Expand Down