updating for dockerhub
This commit is contained in:
parent
cde5bdacf0
commit
d5db3d1785
27
README.md
27
README.md
@ -7,7 +7,9 @@ act - circuit design and digital simulation<br>
|
|||||||
prspice - configure digital/analog circuit co-simulation<br>
|
prspice - configure digital/analog circuit co-simulation<br>
|
||||||
Xyce - analog circuit simulation<br>
|
Xyce - analog circuit simulation<br>
|
||||||
gaw - analog waveform viewer<br>
|
gaw - analog waveform viewer<br>
|
||||||
|
klayout - circuit layout<br>
|
||||||
magic - circuit layout<br>
|
magic - circuit layout<br>
|
||||||
|
OpenROAD - physical design<br>
|
||||||
|
|
||||||
Semiconductor PDKs are in /opt/cad/conf<br>
|
Semiconductor PDKs are in /opt/cad/conf<br>
|
||||||
Packages may be installed with 'sudo apt install <package>'<br>
|
Packages may be installed with 'sudo apt install <package>'<br>
|
||||||
@ -22,7 +24,7 @@ mkdir ~/tech; tar -xzvf sky130.tar.gz -C ~/tech
|
|||||||
```
|
```
|
||||||
Pull the docker image for the broccoli command line interface, and configure it.
|
Pull the docker image for the broccoli command line interface, and configure it.
|
||||||
```
|
```
|
||||||
docker pull public.ecr.aws/l5h5o6z4/broccoli-cli:latest
|
docker pull broccolimicro/broccoli-cli:latest
|
||||||
git clone https://git.broccolimicro.io/Broccoli/broccoli-cli.git
|
git clone https://git.broccolimicro.io/Broccoli/broccoli-cli.git
|
||||||
source broccoli-cli/bcli-develop.sh
|
source broccoli-cli/bcli-develop.sh
|
||||||
export BCLI_TECH="$HOME/tech"
|
export BCLI_TECH="$HOME/tech"
|
||||||
@ -57,6 +59,29 @@ bcli down
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
This script runs the docker container with the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
# This produces a list of groups and their gids like so:
|
||||||
|
# 1000 nbingham
|
||||||
|
# 138 docker
|
||||||
|
# ...
|
||||||
|
MEMBERS="$(groups | sed 's/ /\n/g' | xargs -I{} getent group {} | sed 's/\([^:]*\):[^:]*:\([^:]*\):.*/\2 \1/g')"
|
||||||
|
|
||||||
|
docker run --rm -d --net=host \
|
||||||
|
-v $HOME:/host \
|
||||||
|
-v "${BCLI_TECH:-/opt/tech}:/opt/cad/conf" \
|
||||||
|
--name "bcli-$USER" \
|
||||||
|
-h "bcli-$USER" \
|
||||||
|
-e USER=$USER \
|
||||||
|
-e USER_ID=$(id -u) \
|
||||||
|
-e GROUP_ID=$(id -g) \
|
||||||
|
-e DISPLAY=$DISPLAY \
|
||||||
|
-e MEMBERS="$MEMBERS" \
|
||||||
|
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
|
||||||
|
broccolimicro/broccoli-cli:latest > /dev/null
|
||||||
|
```
|
||||||
|
|
||||||
There are multiple versions of docker, the one that seems to work best for this is `docker.io`. `docker-ce` seems to have trouble writing files in the container.
|
There are multiple versions of docker, the one that seems to work best for this is `docker.io`. `docker-ce` seems to have trouble writing files in the container.
|
||||||
```
|
```
|
||||||
sudo apt install docker.io
|
sudo apt install docker.io
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
bcli() {
|
bcli() {
|
||||||
if [ "$1" = "up" ]; then
|
if [ "$1" = "up" ]; then
|
||||||
MEMBERS="$(groups | sed 's/ /\n/g' | xargs -I{} getent group {} | sed 's/\([^:]*\):[^:]*:\([^:]*\):.*/\2 \1/g')"
|
MEMBERS="$(groups | sed 's/ /\n/g' | xargs -I{} getent group {} | sed 's/\([^:]*\):[^:]*:\([^:]*\):.*/\2 \1/g')"
|
||||||
docker run --rm -d --net=host -v $HOME:/host -v "${BCLI_TECH:-/opt/tech}:/opt/cad/conf" --name "bcli-$USER" -h "bcli-$USER" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -e MEMBERS="$MEMBERS" -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" public.ecr.aws/l5h5o6z4/broccoli-cli:latest > /dev/null
|
docker run --rm -d --net=host -v $HOME:/host -v "${BCLI_TECH:-/opt/tech}:/opt/cad/conf" --name "bcli-$USER" -h "bcli-$USER" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -e MEMBERS="$MEMBERS" -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" broccolimicro/broccoli-cli:latest > /dev/null
|
||||||
#docker run --rm -d -v $HOME:/host -v "${BCLI_TECH:/opt/tech}:/opt/cad/conf" --name "bcli-$USER" -h "bcli-$USER" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" ${BCLI_IMAGE:-public.ecr.aws/l5h5o6z4/broccoli-cli:latest} > /dev/null
|
|
||||||
echo "bcli-$USER started"
|
echo "bcli-$USER started"
|
||||||
elif [ "$1" = "down" ]; then
|
elif [ "$1" = "down" ]; then
|
||||||
docker stop "bcli-$USER" > /dev/null
|
docker stop "bcli-$USER" > /dev/null
|
||||||
echo "bcli-$USER stopped"
|
echo "bcli-$USER stopped"
|
||||||
#legacy, or if server files change faster than a new download
|
#legacy, or if server files change faster than a new download
|
||||||
elif [ "$1" = "mount" ]; then
|
elif [ "$1" = "mount" ]; then
|
||||||
if [ -z "$BROCCOLI_USER" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo "Please set the BROCCOLI_USER environment variable for ssh access."
|
echo "expected an ssh path to a tech directory (user@server:path/to/tech)."
|
||||||
else
|
else
|
||||||
mkdir -p $HOME/tech
|
mkdir -p $HOME/tech
|
||||||
sshfs $BROCCOLI_USER@broccolimicro.io:/opt/tech $HOME/tech/
|
sshfs $2 $HOME/tech/
|
||||||
fi
|
fi
|
||||||
elif [ "$1" = "unmount" ]; then
|
elif [ "$1" = "unmount" ]; then
|
||||||
shift
|
shift
|
||||||
|
Loading…
Reference in New Issue
Block a user