From 9e47554dfd5aa500a259c0d828ac1ee104ceb0fe Mon Sep 17 00:00:00 2001 From: YD meta Date: Sun, 17 Apr 2022 23:14:08 +0300 Subject: [PATCH 1/2] added init --- Dockerfile | 7 +++++++ Taskfile.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ readme.human.md | 4 ++++ requirements.txt | 3 ++- 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 Taskfile.yaml create mode 100644 readme.human.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..dd108028 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.6-buster + +COPY requirements.txt /orig/requirements.txt +CMD pip install -r /orig/requirements.txt + + + diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 00000000..4d202d67 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,48 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + dev_venv: PreSumm-env + dev_dimg: presumm-dimg-dev + +tasks: + default: + cmds: + - task -l + silent: true + + build-docker-dev: + desc: builds development docker + cmds: + - docker build -t {{.dev_dimg}} . + + resolve-deps-blobs: + desc: fetch preprocessed data + dir: bert_data + cmds: + - wget -O bert_data_xsum_final.zip https://doc-0c-5k-docs.googleusercontent.com/docs/securesc/hssnm9ldf9bkeoqf7im84p4glf9g3mgu/3s76afkl7idnmbhh7c3d99rhuikrg9eg/1650225075000/02403291851892694101/15106390828028366018/1BWBN1coTWGBqrWoOfRc5dhojPHhatbYs?e=download&ax=ACxEAsaf17dH9RB_Vbza2GO4Ck-qJ5h26V-St_uRmMkemv8d2y8I3Wfif7KhlsgKCMc1kOKi9eo9JxIYUlnlsqUSVcOHv4PQ4TvdiOzUAeda7dia6WNWtN-Y9aYpI3q7ARTSWfaB9OspLk3A2BnnAt3cq8Lk7_ieD8my1fCjGYPZPCICrUTHqcknT-v-FV3okbhnLLJDdszLBZd6Lj0Elk1Q1jk4nc_Xl7jRwyUgD9ycFh5kJbptRyuc9gy_5dWhpZTTZqpCy8RuchCBtLjkxG3d8du4l89bIlRsBBRuYijUznblfe_qbjZjC0VsyS0NnW1ieOnhmTQOSigDOEXn2V6SHijbPKI20TKOXG2q4fpsgxD99Y031wxpgciUFsQ8cc9R6eQjE0KYbBY06uDvt6beOOoByaqcP6akGycoPuWeDfoAyrHjig5uBRZVrkwSkV3HQanKlm76An_xehFFN_lgc2nCEy6iZmyoBWm4merOkCuPuxV3Uxy2B9Na4vUXjUmxPXbfdOCoEyTOxbJLahfcftMHGiguJ_d_2lILDtun4-SBJNtasKPCVz0EFmEEf3ugtn9g74Lt1vfOWDXPVoprx-ir1GyGRwxkwFPDbeZptccyBLadEB-mGy7x54FBt0LFgaM_ohlKAhIZsNaxbzydaBLVc7sL23jhjm3pqAIG-ENNvbrKbeNvKtAkRyYWyd0CxflJU3dDd8vN_A&authuser=0&nonce=h6jigrmul94vq&user=15106390828028366018&hash=uk33b539pu1ud61p0hrpsce0glkqp0d3 + + # --- Setup Virtual Environment --- + + setup-dev-venv: + desc: setup conda developer venv (not obligatory) + cmds: + - conda create -c conda-forge -y -n {{.dev_venv}} 'python=3.6' pip + status: + - conda run -n {{.dev_venv}} pwd + + update-dev-venv: + desc: setup conda developer venv (not obligatory) + deps: + - task: setup-dev-venv + cmds: + - conda run -n {{.dev_venv}} pip install -r requirements.txt + + show-dev-venv-activate: + desc: _ + cmds: + - echo conda activate {{.dev_venv}} + + # --- /Setup Virtual Environment --- diff --git a/readme.human.md b/readme.human.md new file mode 100644 index 00000000..60f16fdd --- /dev/null +++ b/readme.human.md @@ -0,0 +1,4 @@ +# PreSum Alternative Readme + +## How to build docker + diff --git a/requirements.txt b/requirements.txt index 136141b8..4a81b820 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ numpy==1.17.2 pyrouge==0.1.3 pytorch-transformers==1.2.0 tensorboardX==1.9 -torch==1.1.0 \ No newline at end of file +torch==1.1.0 +# torch==1.1.0 pytorch_transformers tensorboardX multiprocess pyrouge \ No newline at end of file From d2b2c7529bdc4484580559a42cd15b1068e9b1e2 Mon Sep 17 00:00:00 2001 From: YD meta Date: Mon, 18 Apr 2022 21:31:43 +0300 Subject: [PATCH 2/2] readme --- readme.human.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/readme.human.md b/readme.human.md index 60f16fdd..9c84e2e1 100644 --- a/readme.human.md +++ b/readme.human.md @@ -2,3 +2,28 @@ ## How to build docker +### Base Tools + +We use [Taskfile](https://taskfile.dev/#/installation) for high-level automation +you can install in next way (alse see the link) + +> on mac +``` +brew install go-task/tap/go-task +``` + +> on linux +``` +sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d +sudo mv ./bin/task /usr/local/bin +``` + +### From Source + +To start please follow next sequence + +```shell +# clone repo https://github.com/yairdardev/PreSumm.git +git clone https://github.com/yairdardev/PreSumm.git + +``` \ No newline at end of file