Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 46eda8d

Browse files
authored
Merge pull request DynamicsAndNeuralSystems#23 from DynamicsAndNeuralSystems/dev_docker
Docker image
2 parents 03925bd + 5f5107a commit 46eda8d

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Debian linux distribution with python 3.9
2+
FROM --platform=linux/amd64 python:3.9-slim-buster
3+
4+
# Set the working directory
5+
WORKDIR /pyspi_project
6+
7+
# Copy the current directory contents into the container
8+
COPY . .
9+
10+
# Update the package index and install essential packages
11+
RUN apt-get update && apt-get install -y build-essential octave
12+
13+
# Upgrade pip and setuptools
14+
RUN pip install --upgrade pip setuptools
15+
16+
# Install any needed packages specified in requirements.txt
17+
RUN pip install --no-cache-dir -r requirements.txt && \
18+
python setup.py install
19+
20+
# Make port 80 available to communicate with other containters if needed
21+
# EXPOSE 80
22+
23+
# Run app.py when the container launches
24+
CMD ["python"]

docs/source/installation.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,25 @@ Next, download or clone the `latest version <https://github.com/olivercliff/pysp
2727

2828
.. code-block:: console
2929
30-
$ git clone https://github.com/olivercliff/pyspi.git
30+
$ git clone https://github.com/olivercliff/pyspi.git
3131
$ cd pyspi
3232
$ pip install .
3333
3434
You can confirm that `pyspi` and dependencies installed properly with the following command:
3535

3636
.. code-block:: console
3737
38-
$ setup.py test
38+
$ setup.py test
39+
40+
Docker Image
41+
------------
42+
43+
Alternatively, you can use the `pyspi Docker image <https://hub.docker.com/r/arianguyen/pyspi>`_, which contains all the dependencies and the toolkit itself.
44+
After downloading Docker Desktop and creating an account, you can run the following commands to pull and run the image:
45+
46+
.. code-block:: console
47+
48+
$ docker pull arianguyen/pyspi:v1.0
49+
$ docker run -it arianguyen/pyspi:v1.0
50+
51+
This should start a python session with `pyspi` installed and ready to import.

0 commit comments

Comments
 (0)