Skip to content

Commit 15032f7

Browse files
committed
Add Docker support for setup.
1 parent 3149bb0 commit 15032f7

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM continuumio/miniconda3 AS build
2+
3+
WORKDIR /pydatastructs
4+
5+
COPY . .
6+
7+
RUN conda env create --file environment.yml
8+
RUN conda run -n pyds-env python scripts/build/install.py
9+
RUN conda run -n pyds-env python scripts/build/develop.py
10+
11+
CMD ["conda", "run", "-n", "pyds-env", "python", "-c", "from pydatastructs.utils.testing_util import test; test(); import time; time.sleep(3600)"]

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,43 @@ python scripts/build/develop.py
4343

4444
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`.
4545

46+
## Installation using Docker
47+
48+
Follow these steps to set up and use Pydatastructs with Docker.
49+
50+
Ensure that Docker is installed and running on your system. You can download it from [Docker's official website](https://www.docker.com/).
51+
52+
53+
### Step 1: Build the Docker Image
54+
55+
Run the following command to build the Docker image:
56+
57+
```bash
58+
docker build -t pyds .
59+
```
60+
This will create a Docker image named pyds.
61+
62+
### Step 2: Create and Start Container
63+
Use the following command to create and run a container from the pyds image:
64+
65+
```bash
66+
docker run -d --name pyds-container pyds
67+
```
68+
69+
### Step 3: Access the Container Terminal
70+
To open a terminal session inside the running container, execute:
71+
72+
```bash
73+
docker exec -it pyds-container bash
74+
```
75+
76+
### Step 4: Activate Environment inside the Container
77+
78+
```bash
79+
conda activate pyds-env
80+
```
81+
82+
4683
Testing
4784
-------
4885

0 commit comments

Comments
 (0)