From 3149bb0795967c04d1f4728807ffe52cb3f02f0f Mon Sep 17 00:00:00 2001 From: patelalay231 Date: Fri, 6 Dec 2024 18:20:58 +0000 Subject: [PATCH 1/2] minor update in readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 85cf84db..008b4986 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,14 @@ In the terminal, run: `python -c "from pydatastructs.utils.testing_util import t This will run all the test files, except benchmark tests. This should be used if benchmark tests are computationally too heavy to be run on your local machine. +### testing specific module + +If you want to run tests for a specific module or file, you can use the following command: + +```python +pytest +``` + Why do we use Python? ------------------ From 15032f72c26be7598d704b653216323f0c1d7211 Mon Sep 17 00:00:00 2001 From: patelalay231 Date: Fri, 13 Dec 2024 03:00:14 +0530 Subject: [PATCH 2/2] Add Docker support for setup. --- Dockerfile | 11 +++++++++++ README.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..98a44500 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM continuumio/miniconda3 AS build + +WORKDIR /pydatastructs + +COPY . . + +RUN conda env create --file environment.yml +RUN conda run -n pyds-env python scripts/build/install.py +RUN conda run -n pyds-env python scripts/build/develop.py + +CMD ["conda", "run", "-n", "pyds-env", "python", "-c", "from pydatastructs.utils.testing_util import test; test(); import time; time.sleep(3600)"] \ No newline at end of file diff --git a/README.md b/README.md index 008b4986..2f8fe021 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,43 @@ python scripts/build/develop.py Make sure you change your working directory to `pydatastructs` before executing any of the above commands. Also, your python version should be at least `3.8`. +## Installation using Docker + +Follow these steps to set up and use Pydatastructs with Docker. + +Ensure that Docker is installed and running on your system. You can download it from [Docker's official website](https://www.docker.com/). + + +### Step 1: Build the Docker Image + +Run the following command to build the Docker image: + +```bash +docker build -t pyds . +``` +This will create a Docker image named pyds. + +### Step 2: Create and Start Container +Use the following command to create and run a container from the pyds image: + +```bash +docker run -d --name pyds-container pyds +``` + +### Step 3: Access the Container Terminal +To open a terminal session inside the running container, execute: + +```bash +docker exec -it pyds-container bash +``` + +### Step 4: Activate Environment inside the Container + +```bash +conda activate pyds-env +``` + + Testing -------