From 02d162b5049ba0f84a2ef461d8ac93940428248c Mon Sep 17 00:00:00 2001 From: Finn Kranzosch Date: Sun, 9 Oct 2022 20:35:54 +0200 Subject: [PATCH 1/5] Added Dockerfile --- .dockerignore | 3 +++ Dockerfile | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3d0e192 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +LICENSE +README.md +.github \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3a8c470 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# pull official base image +FROM python:3.8.6 + +RUN apt-get install libsndfile1 + +RUN pip install --no-cache datasets transformers soundfile numpy torch torchaudio + +COPY . . From 2c9a56eaae1cd247c09ce9428bba0e30b1d5b9f0 Mon Sep 17 00:00:00 2001 From: Finn Kranzosch Date: Sun, 9 Oct 2022 20:42:25 +0200 Subject: [PATCH 2/5] Added Docker section to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c13358a..cef164a 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,11 @@ You can read about models from the list: - [*airesearch/wav2vec2-large-xlsr-53-th* - AI RESEARCH - PyThaiNLP model](https://medium.com/airesearch-in-th/airesearch-in-th-3c1019a99cd) - [*annaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model](https://huggingface.co/wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm) - [*wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model](https://huggingface.co/wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut) + +### Docker +To use this inside of Docker do the following: +```sh +docker build -t . + docker run docker run --entrypoint /bin/bash -it +``` +You will then get access to a interactive shell environment where you can use python with all packages installed. From c68d231adc7a3d92492a94c7dd453c5c5dc93fff Mon Sep 17 00:00:00 2001 From: Finn Kranzosch Date: Sun, 9 Oct 2022 20:43:10 +0200 Subject: [PATCH 3/5] Fixed typo in Docker section of README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cef164a..e7adda8 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,6 @@ You can read about models from the list: To use this inside of Docker do the following: ```sh docker build -t . - docker run docker run --entrypoint /bin/bash -it +docker run docker run --entrypoint /bin/bash -it ``` You will then get access to a interactive shell environment where you can use python with all packages installed. From ffa8a96dd0c40ea8b967c03b3f285a5e36eae34e Mon Sep 17 00:00:00 2001 From: Finn Kranzosch Date: Sun, 9 Oct 2022 21:12:25 +0200 Subject: [PATCH 4/5] Added pip install -e . to dockerfile --- .dockerignore | 1 - Dockerfile | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 3d0e192..c9805fa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,2 @@ LICENSE -README.md .github \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3a8c470..e6b5d85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ FROM python:3.8.6 RUN apt-get install libsndfile1 RUN pip install --no-cache datasets transformers soundfile numpy torch torchaudio +RUN pip install -e . COPY . . From 0f4cefc4a85d418572dfe0129868ee5c368d31c3 Mon Sep 17 00:00:00 2001 From: Finn Kranzosch Date: Sun, 9 Oct 2022 21:43:26 +0200 Subject: [PATCH 5/5] Moved pip install -e . after COPY --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e6b5d85..8d35d70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM python:3.8.6 RUN apt-get install libsndfile1 RUN pip install --no-cache datasets transformers soundfile numpy torch torchaudio -RUN pip install -e . COPY . . + +RUN pip install -e .