1
1
Create your own pydyna-pre service docker container
2
- :::::::::::::::::::::::::::::::::::::::::::::::::::
2
+ ===================================================
3
3
4
4
The pydyna-pre service Docker containers can be easily built by following
5
5
these steps.
6
6
7
- To build the docker image you will need to clone pydyna repo locally:
7
+ Inside this folder, the instructions (i.e. ``Dockerfile `` files) for
8
+ building the pydyna-pre service Docker containers are made available.
8
9
9
- .. code :: console
10
-
11
- git clone https://github.com/pyansys/pydyna.git
12
- cd pydyna
13
-
14
- * ``docker/pre/Dockerfile ``: this file builds the Linux-based Docker image.
10
+ * ``Dockerfile ``: this file builds the Linux-based Docker image.
15
11
16
12
Prerequisites
17
13
^^^^^^^^^^^^^
18
14
19
15
* Ensure that ``docker `` is installed in your machine.
20
16
If you do not have ``docker `` available, please refer to the
21
17
`official Docker site <https://www.docker.com >`_.
18
+ Note that the container can also be started on Windows if the Docker Desktop has been installed.
19
+ How to install the Docker Desktop: https://docs.docker.com/desktop/install/windows-install/
20
+
21
+ * Download the latest release artifacts. You can do this as follows:
22
+
23
+ * Latest Linux artifacts: `linux-binaries.zip <https://github.com/ansys/pydyna/releases/download/v0.3.1/linux-binaries.zip >`_
24
+
25
+ * Move these ``.zip `` files to the current location (i.e. ``<repository-root-folder>/docker/pre ``).
22
26
23
- * Download the latest release artifacts for the Linux
24
- Docker container. You can do this as follows:
27
+ Starting the docker container
28
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25
29
26
- * Latest Linux artifacts: ` linux-binaries.zip < https://github.com/ansys/pydyna/releases/download/v0.2.1/linux-binaries.zip >`_
30
+ There are two ways to start docker container.
27
31
28
- * Move these ``.zip `` files to the current location (i.e. ``<repository-root-folder>/docker ``).
32
+ 1.bulid image and run container
33
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
29
34
30
35
Building the Docker images
31
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
36
+ ::::::::::::::::::::::::::
32
37
33
38
In order to build your images, follow the next instructions:
34
39
35
- * Locate yourself at ``<repository-root-folder>/docker `` in your terminal.
40
+ * Locate yourself at ``<repository-root-folder>/docker/pre `` in your terminal.
36
41
* Run the following Docker command:
37
42
38
43
.. code :: bash
@@ -56,13 +61,13 @@ In order to build your images, follow the next instructions:
56
61
>>> ...... ...... ............ .............. ......
57
62
58
63
Run the image as a container
59
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64
+ ::::::::::::::::::::::::::::
60
65
61
66
* Run the following Docker command:
62
67
63
68
.. code :: bash
64
69
65
- docker run -d -p 50051:50051 ghcr.io/ansys/ls-pre .
70
+ docker run -d -p 50051:50051 ghcr.io/ansys/ls-pre
66
71
67
72
* Check that the image has been created successfully.
68
73
@@ -71,4 +76,19 @@ Run the image as a container
71
76
72
77
73
78
>>> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74
- >>> c77ffd67f9fa ghcr.io/ansys/ls-pre " python3 ./linux-bin…" 7 seconds ago Up 7 seconds 0.0.0.0:50051-> 50051/tcp, :::50051-> 50051/tcp hardcore_margulis
79
+ >>> c77ffd67f9fa ghcr.io/ansys/ls-pre " python3 ./linux-bin…" 7 seconds ago Up 7 seconds 0.0.0.0:50051-> 50051/tcp, :::50051-> 50051/tcp hardcore_margulis
80
+
81
+
82
+ 2.Start the container from docker-compose.yml file
83
+ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
84
+
85
+ Make sure the docker compose have been installed on your computer.
86
+ For more information: https://docs.docker.com/compose/install/
87
+
88
+ * Locate yourself at ``<repository-root-folder>/docker/pre `` in your terminal.
89
+ * Run the following Docker command:
90
+
91
+ .. code :: bash
92
+
93
+ docker compose up -d
94
+
0 commit comments