Compare commits

...

3 Commits

Author SHA1 Message Date
0433b2acea Add remote option 2023-09-06 01:04:33 -03:00
ce06807f84 Fix volare user and working directory 2023-09-06 01:04:10 -03:00
6f91d4ea87 Update README 2023-09-06 01:02:53 -03:00
4 changed files with 44 additions and 26 deletions

View File

@ -1,39 +1,46 @@
# OSIC Stacks
Open source Integrated Circuits Docker Stacks
*Open Source Integrated Circuits Docker Stacks*
## Stacks
- analog-xk: Analog workflow using XScheme & KLayout
- analog-xm: Analog workflow using XScheme & Magic
- digital-ator: Digital workflow using Verilator & Yosys
- digital-icarus: Digital workflow using Icarus & Yosys
- heavy: Workflow with all the previous tools
- **analog-xk**: Analog workflow using XScheme & KLayout
- **analog-xm**: Analog workflow using XScheme & Magic
- **digital-ator**: Digital workflow using Verilator & Yosys
- **digital-icarus**: Digital workflow using Icarus & Yosys
- **heavy**: Workflow with all the previous tools
## Usage
There are scripts provided for running the containers for each OS, this is because containers require binding the display enviroment variables to enable graphic output.
### Windows
### Starting a container with graphics output
#### Windows
Execute the next script in powershell.
```pwsh
iex "& { $(irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/scripts wsl_start.ps1) } Run Job"
iex "& { $(irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/scripts/wsl_start.ps1) } Run Job"
```
This script will run the container inside wsl and bind the enviroments variables for [wslg](https://github.com/microsoft/wslg/blob/main/samples/container/Containers.md).
### Linux
TODO:
#### Linux
Execute the next script in your terminal. Make sure you have `curl` already installed.
```sh
curl https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/scripts/linux_start.sh -o linux_start.sh
```
### Connecting to the container
After starting the container enter to it executing a shell with docker.
```sh
docker exec -it <container_name> bash
```
## Build
A singular stack image can be builded using docker in the following way.
> Note: Each stack image requires their correspondent base image installed.
```docker build -t <tag> -f <arch/jammy>.Dockerfile <path>```
For building all stacks, build the project with docker compose.
```docker compose build```
```sh
docker build -t <tag> -f <arch/jammy>.Dockerfile <path>
```
## Custom Images

View File

@ -8,10 +8,6 @@ RUN pacman -Syuq --noconfirm
# Install packages
RUN aur-install sudo git python python-pipx xz gnu-free-fonts
# Install volare
ENV PATH="${PATH}:/root/.local/bin"
RUN pipx install volare
# Clean cache
RUN pacman -Scc
@ -19,5 +15,11 @@ RUN pacman -Scc
RUN useradd -m designer
RUN echo "designer ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/designer
# Install volare
USER designer
ENV PATH="${PATH}:/home/designer/.local/bin"
RUN pipx install volare
WORKDIR /home/designer
# Initialize the enviroment keeping container alive
CMD ["sleep", "infinity"]

View File

@ -1,14 +1,22 @@
param($remote)
$imagename = Read-Host -Prompt 'Container image to initialize'
$containername = Read-Host -Prompt 'Container instance name [default=$imagename]'
if (!$containername) { $containername = $imagename }
if($remote -eq "remote") {
$image = "git.1159.cl/mario1159/$imagename"
} else {
$image = $imagename
}
$command = ("docker run -d " +
"--name "+ $containername + " " +
"--name $containername " +
"-v /tmp/.X11-unix:/tmp/.X11-unix " +
"-v /mnt/wslg:/mnt/wsl " +
"-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " +
"-e DISPLAY=`$DISPLAY " +
"-e XDG_RUNTIME_DIR=/mnt/wslg " +
$imagename)
$image)
wsl bash -ic $command

View File

@ -2,13 +2,14 @@
# Dev enviroment for analog circuits development using xschem and klayout.
FROM osicstack-base-arch
# Update packages
RUN sudo pacman -Syuq --noconfirm
# Install packages
RUN aur-install xschem klayout
RUN sudo aur-install xschem klayout
# Clean cache
RUN pacman -Scc
USER designer
RUN sudo pacman -Scc
# Initialize the enviroment keeping container alive
CMD ["sleep", "infinity"]