Skip to content

Commit 71b0dc8

Browse files
ChrisGeorgakidisdvaliantzaszazatisn
committed
Solved issues regarding Docker Setup
Resolved some issues with the Docker setup. Specifically, the problem was that the relative path of the INSTALL directory was specified in the Makefile. However, Docker requires absolute paths, which caused the UPSET not to be found. Additionally, in the updated version, the overall data folder is provided in the Docker container, allowing the user to save reports, etc., and to open or edit them on the native machine. Also, updated the instructions regarding the Docker setup, both in the README file and the documentation as well. Co-Authored-By: D.Vali <[email protected]> Co-Authored-By: zazatisn <[email protected]>
1 parent bd404dd commit 71b0dc8

File tree

4 files changed

+32
-9
lines changed

4 files changed

+32
-9
lines changed

Docker_files/create_docker/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
TAG=asp_docker_ubuntu
22
VERSION=v1
33
IMAGE=upset_docker_ubuntu
4-
UPSET_PATH=../data/INSTALL
4+
DATADIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../data)
55

66
build-docker:
77
-docker image rm -f $(IMAGE):$(VERSION)
88
docker build -t $(IMAGE):$(VERSION) .
99

1010
run:
1111
-docker container rm $(TAG) -f
12-
docker run -it --security-opt label=type:container_runtime_t --network=host -e DISPLAY=$$DISPL -v ${UPSET_PATH}:/home/UPSET -v /tmp/.X11-unix:/tmp/.X11-unix --name $(TAG) $(IMAGE):$(VERSION)
12+
docker run -it --security-opt label=type:container_runtime_t --network=host -e DISPLAY=$$DISPLAY -v -v $(DATADIR)/:/home/data -v /tmp/.X11-unix:/tmp/.X11-unix --name $(TAG) $(IMAGE):$(VERSION)
1313

1414
sh:
1515
docker exec -it $(TAG) /bin/bash

Docker_files/use_docker/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
TAG=asp_docker_ubuntu
22
VERSION=v1
33
IMAGE=upset_docker_ubuntu
4-
UPSET_PATH=../data/INSTALL
4+
DATADIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../data)
55

66
build-docker:
77
-docker image rm -f $(IMAGE):$(VERSION)
88
docker build -t $(IMAGE):$(VERSION) .
99

1010
run:
1111
-docker container rm $(TAG) -f
12-
docker run -it --security-opt label=type:container_runtime_t --network=host -e DISPLAY=$$DISPL -v ${UPSET_PATH}:/home/UPSET -v /tmp/.X11-unix:/tmp/.X11-unix --name $(TAG) $(IMAGE):$(VERSION)
12+
docker run -it --security-opt label=type:container_runtime_t --network=host -e DISPLAY=$$DISPLAY -v -v $(DATADIR)/:/home/data -v /tmp/.X11-unix:/tmp/.X11-unix --name $(TAG) $(IMAGE):$(VERSION)
1313

1414
sh:
1515
docker exec -it $(TAG) /bin/bash

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,22 @@ In order to run UPSET with docker, the user needs to download the UPSET tarball
4545

4646
```bash
4747
cd Docker_files
48+
# Create the data folder and copy the INSTALL folder inside it
4849
mkdir data
49-
cp -r <INSTALL folder> data
50-
cd create_docker
50+
cd data
51+
cp -r <INSTALL folder> ./
52+
# Build the docker image
53+
cd ../create_docker
5154
make build-docker
55+
# Run the docker container
5256
cd ../use_docker
57+
xhost +
5358
make run
5459

5560
/* In Docker Environment */
56-
cd /home/UPSET
61+
cd /home/data/UPSET
62+
export UPSET_INSTALL_DIR = $PWD
63+
./UPSET-setup.sh
5764
./UPSET
5865

5966
/* Save/Load Docker Image */
@@ -63,6 +70,8 @@ cd use_docker
6370
make load
6471
```
6572

73+
More information regarding the use of UPSET in a docker container can be found [here](https://circuits-and-systems-lab-caslab.github.io/UPSET/docker_setup/).
74+
6675
## DEMO
6776
Below there is a demo video of perfoming an exhaustive SET analysis in UPSET.
6877

docs/docker_setup.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This section explains the used docker filesystem while also act as a guide on ho
2424
## Build Docker Image
2525
| Command | Description |
2626
| --- | --- |
27+
| `> cd Docker_files` | Go to Docker_files folder of UPSET repository |
2728
| `> mkdir data` | Create the data folder |
2829
| `> cd data` | Go to data folder |
2930
| `> cp -r <INSTALL folder> ./` | Copy the desired INSTALL folder |
@@ -42,6 +43,7 @@ This section explains the used docker filesystem while also act as a guide on ho
4243
| Command | Description |
4344
| --- | --- |
4445
| `> cd ../use_docker` | Go to use_docker folder |
46+
| `> xhost +` | Ensure that you can open UPSET GUI insde the docker container |
4547
| `> make run` | Run the docker container |
4648
| `> make sh` | Run in different terminal if container is already running without terminating it [optional] |
4749

@@ -50,10 +52,22 @@ This section explains the used docker filesystem while also act as a guide on ho
5052
If you want to run on different terminal then use `make sh`.
5153
Also, running `make sh` without prior `make run` will not work.
5254

53-
5455
## Docker/VM Filesystem
5556
| Folder | Description |
5657
| --- | --- |
5758
| `/home` | Home |
5859
| `/home/data/<INSTALL folder>` | UPSET folder |
59-
| `/home/data` | Data (Shared) Folder |
60+
| `/home/data` | Data (Shared) Folder |
61+
62+
# Run UPSET in Docker
63+
64+
After building the docker image and running the docker container, you can run UPSET in the docker container.
65+
66+
## Run UPSET
67+
68+
| Command | Description |
69+
| --- | --- |
70+
| `> cd /home/data/UPSET` | Go to UPSET folder |
71+
| `> export UPSET_INSTALL_DIR = $PWD` | Set the UPSET_INSTALL_DIR environment variable |
72+
| `> ./UPSET-setup.sh` | Run the setup script |
73+
| `> ./UPSET` | Run UPSET |

0 commit comments

Comments
 (0)