From 22f8ae01e9162c114dedf55e6ec700e753d81116 Mon Sep 17 00:00:00 2001 From: copoer Date: Thu, 4 May 2023 20:42:25 -0300 Subject: [PATCH 1/3] Added Dockerfile to make it easier to use --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..53fb9f7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM pytorch/pytorch:1.7.0-cuda11.0-cudnn8-runtime + +RUN apt update +RUN apt install -y build-essential + +COPY requirements.txt . +RUN pip install --ignore-installed -r requirements.txt +RUN pip install transformers + +COPY . . +RUN pip install --upgrade numpy +RUN python ./main_run.py --help + +CMD /bin/bash From 6822e1e0802721ffd79b9d81ec470f047f8338c4 Mon Sep 17 00:00:00 2001 From: copoer Date: Thu, 4 May 2023 20:47:10 -0300 Subject: [PATCH 2/3] Added documentation --- Dockerfile | 6 +++++- README.md | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 53fb9f7..66cf21f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ FROM pytorch/pytorch:1.7.0-cuda11.0-cudnn8-runtime +# Update system RUN apt update RUN apt install -y build-essential +# Install Requirements COPY requirements.txt . RUN pip install --ignore-installed -r requirements.txt RUN pip install transformers +RUN pip install --upgrade numpy +# Copy over files and run COPY . . -RUN pip install --upgrade numpy RUN python ./main_run.py --help +# Enter and run what you like CMD /bin/bash diff --git a/README.md b/README.md index f83ebf0..cafeab1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,21 @@ python main_run.py --folder=bgl/ --log_file=BGL.log --dataset_name=bgl --model_n python main_run.py --help ``` + +### Docker + +#### Build + +``` +docker build -t lad . +``` + +#### Run + +``` +docker run -it lad +``` + ## Citation If you find the code and models useful for your research, please cite the following paper: ``` From 466abc5bcabb3c010d2e45faefa61f50554149e6 Mon Sep 17 00:00:00 2001 From: copoer Date: Thu, 4 May 2023 20:49:21 -0300 Subject: [PATCH 3/3] Run with GPU --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cafeab1..96e5cbc 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ docker build -t lad . #### Run ``` -docker run -it lad +docker run --gpus all -it lad ``` ## Citation