From ae06898a83501a55a83ee13437e9706c1f1bc857 Mon Sep 17 00:00:00 2001 From: Aidan Neeson Date: Tue, 5 Sep 2023 17:49:22 -0400 Subject: [PATCH 1/3] Add Dockerfile for running Chasten Also edit the .gitignore to include bash command-line history --- .gitignore | 3 +++ Dockerfile | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index 60550e83..e7231e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -366,3 +366,6 @@ coverage.txt # coverage report coverage.json + +# bash command history +.bash_history diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7a58a4af --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +FROM ubuntu + +RUN apt-get update -y \ + && apt-get upgrade -y \ + && apt-get install software-properties-common -y \ + && add-apt-repository ppa:deadsnakes/ppa -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install python3.11 -y \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 \ + && apt-get install python-is-python3 -y + +RUN apt-get install -y curl \ + && curl -sSL https://install.python-poetry.org | python - \ + && apt install -y python3.11 python3.11-distutils \ + && curl -sSl https://bootstrap.pypa.io/get-pip.py | python - + +RUN apt-get install -y libsqlite3-dev \ + && apt-get install python3.11-dev -y \ + && apt-get install -y libgmp-dev \ + portaudio19-dev \ + libssl-dev \ + libpcap-dev \ + libffi-dev \ + libxml2-dev \ + libxslt1-dev \ + libblas-dev \ + libatlas-base-dev \ + && apt-get install -y gcc-x86-64-linux-gnu + +CMD cd root \ + && mkdir src + +ENTRYPOINT export PATH="/root/.local/bin:$PATH" && cd root/src && /bin/bash \ No newline at end of file From 5c1cd82af4fb1e522ccaa7298ffc60a422bf4e76 Mon Sep 17 00:00:00 2001 From: Aidan Neeson Date: Tue, 19 Sep 2023 14:28:36 -0400 Subject: [PATCH 2/3] docs: add docker usage steps to readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index a0f2d6c2..f8ae4e54 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,25 @@ Follow these steps to install the `chasten` program: - Type `pipx list` and confirm that Chasten is installed - Type `chasten --help` to learn how to use the tool +## 🐋 Docker + +There is also the option to use [Docker](https://www.docker.com/) to interact with `chasten` + +Follow these steps to utilize Docker: + +- Install Docker Desktop for your operating system +- Ensure Docker Desktop is running +- `cd` into the chasten directory where the `Dockerfile` is located +- Type `docker build -t chasten .` to build the container +- Type one of the following commands to run the container: + - Windows (Command Prompt) -> `docker run --rm -v "%cd%":/root/src -it chasten` + - Windows (Powershell) -> `docker run --rm -v ${pwd}:/root/src -it chasten` + - Mac/Ubuntu -> `docker run --rm -v $(pwd):/root/src -it chasten` +- Inside the container type `poetry install` +- Outside of the container type `docker ps` to view running container information +- Outside of the container type `docker commit ` to save the dependecy installation +- Now you can use Docker for all of your `chasten` needs! + ## 🪂 Configuration You can configure `chasten` with two YAML files, normally called `config.yml` From c71812ef718c13269fe69268f89e70d3e8623ff8 Mon Sep 17 00:00:00 2001 From: Haylee Pierce Date: Tue, 26 Sep 2023 16:11:49 -0400 Subject: [PATCH 3/3] docs: Add requested changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8ae4e54..d48cd858 100644 --- a/README.md +++ b/README.md @@ -91,11 +91,11 @@ Follow these steps to install the `chasten` program: ## 🐋 Docker -There is also the option to use [Docker](https://www.docker.com/) to interact with `chasten` +There is also the option to use [Docker](https://www.docker.com/) to use `chasten` Follow these steps to utilize Docker: -- Install Docker Desktop for your operating system +- Install [Docker Desktop](https://docs.docker.com/get-docker/) for your operating system - Ensure Docker Desktop is running - `cd` into the chasten directory where the `Dockerfile` is located - Type `docker build -t chasten .` to build the container