forked from Mario1159/osic-stacks
Merge branch 'main' of https://git.1159.cl/Mario1159/osic-stacks
This commit is contained in:
commit
4a3f30d5e9
315
.gitea/workflows/release.yml
Normal file
315
.gitea/workflows/release.yml
Normal file
@ -0,0 +1,315 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build-base:
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build desktop base
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
tags: git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./base/desktop.Dockerfile
|
||||
|
||||
- name: Build web base
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/osicstacks-base-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./base/web.Dockerfile
|
||||
|
||||
build-analog-xk:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build analog-xk desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/analog-xk-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-xk.Dockerfile
|
||||
|
||||
- name: Build analog-xk web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/analog-xk-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-xk.Dockerfile
|
||||
|
||||
build-analog-xm:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build analog-xm desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/analog-xm-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-xm.Dockerfile
|
||||
|
||||
- name: Build analog-xm web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/analog-xm-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-xm.Dockerfile
|
||||
|
||||
build-analog-heavy:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build analog-heavy desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/analog-heavy-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-heavy.Dockerfile
|
||||
|
||||
- name: Build analog-heavy web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/analog-heavy-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/analog-heavy.Dockerfile
|
||||
|
||||
build-digital-ator:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build digital-ator desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/digital-ator-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-ator.Dockerfile
|
||||
|
||||
- name: Build digital-ator web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/digital-ator-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-ator.Dockerfile
|
||||
|
||||
build-digital-icarus:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build digital-icarus desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/digital-icarus-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-icarus.Dockerfile
|
||||
|
||||
- name: Build digital-icarus web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/digital-icarus-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-icarus.Dockerfile
|
||||
|
||||
build-digital-heavy:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build digital-heavy desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/digital-heavy-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-heavy.Dockerfile
|
||||
|
||||
- name: Build digital-heavy web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/digital-heavy-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/digital-heavy.Dockerfile
|
||||
|
||||
build-heavy:
|
||||
needs: build-base
|
||||
runs-on: [ubuntu-latest, amd64]
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Authentication
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.1159.cl
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build heavy desktop
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-desktop
|
||||
tags: git.1159.cl/mario1159/heavy-desktop
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/heavy.Dockerfile
|
||||
|
||||
- name: Build heavy web
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
build-args: BASE_IMG=git.1159.cl/mario1159/osicstacks-base-web
|
||||
tags: git.1159.cl/mario1159/heavy-web
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./stacks/heavy.Dockerfile
|
46
README.md
46
README.md
@ -13,10 +13,11 @@ include_toc: true
|
||||
|
||||
## Highlights
|
||||
|
||||
- Simple by design, intended for ease to use.
|
||||
- Intended for ease to use, have your tools integrate tightly with your PDK.
|
||||
- IC design tools evolve quickly, a rolling release distribution allows you to have the latest version of your tool set.
|
||||
- Docker images can be heavy, thus these images are distributed in stacks, choose the best fit for your task.
|
||||
- Flexible, these containers doesn't restrict you to extend your development environment, feel free to install your own packages.
|
||||
- Choose between running your applications in a custom linux environment in your web browser or natively in your current desktop environment.
|
||||
|
||||
## Stacks
|
||||
|
||||
@ -28,47 +29,62 @@ include_toc: true
|
||||
- **digital-heavy**: Workflow with all the digital tools
|
||||
- **heavy**: Workflow with all the previous tools
|
||||
|
||||
> Flavors: web / desktop
|
||||
|
||||
## Usage
|
||||
|
||||
Follow these 3 steps to get your container ready.
|
||||
|
||||
### 1. Starting a container with graphics output
|
||||
### 1. Starting a container
|
||||
|
||||
There are two ways to start your container. You can choose (a) to start your container in your actual **desktop** environment and launch the applications from your integrated terminal or (b) you can launch a whole linux desktop environment that can be accessed through a **web** browser.
|
||||
|
||||
> Before following the next steps make sure you have docker running.
|
||||
|
||||
#### 1a. Starting a container in your **desktop** with native graphics output
|
||||
|
||||
Scripts are provided for creating the containers in both Windows and Linux.
|
||||
These scripts automate the binding of graphics environment variables to the container in order to enable graphics inside the docker container.
|
||||
|
||||
#### Windows
|
||||
##### Windows
|
||||
|
||||
Execute the next script in powershell.
|
||||
Execute the next script in powershell and follow the container initialization prompt.
|
||||
```pwsh
|
||||
& ([scriptblock]::Create((irm https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1))) -remote
|
||||
```
|
||||
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).
|
||||
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
|
||||
Execute the next script in your terminal replacing `<container_name>` and `<git.1159.cl/mario1159/image>`.
|
||||
##### Linux
|
||||
Execute the next script in your terminal replacing `<container_name>` by any name and `<stack>` by an stack from the previous [stack list](#stacks).
|
||||
```sh
|
||||
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name <container_name> <git.1159.cl/mario1159/image>
|
||||
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name <container_name> git.1159.cl/mario1159/<stack>-desktop
|
||||
```
|
||||
|
||||
> For Wayland compositors make sure you have XWayland installed
|
||||
|
||||
#### macOS / OS X
|
||||
##### macOS / OS X
|
||||
|
||||
Install `Xquartz` and run the linux previous command.
|
||||
|
||||
#### 1b. Starting a container with a **Web** VNC client
|
||||
If you prefer running the container in your web browser instead of in your integrated terminal, you can select the web flavor of any stack. In this case, it is not necessary to bind extra environment variables for enabling native graphics output.
|
||||
```sh
|
||||
docker run -it -p 8444:8444 --name <container_name> git.1159.cl/mario1159/<stack>-web
|
||||
```
|
||||
|
||||
### 2. Connecting to the container
|
||||
|
||||
#### Desktop
|
||||
#### 2a. Desktop
|
||||
|
||||
Connect to your container with the using the name specified in the previous step.
|
||||
|
||||
After creating and starting the container, enter to it executing a shell with docker.
|
||||
```sh
|
||||
docker exec -it <container_name> bash
|
||||
```
|
||||
|
||||
#### Web
|
||||
#### 2b. Web
|
||||
|
||||
Connect from the web to the VNC client at `localhost:8444`.
|
||||
Access from the web to the VNC client at `https://localhost:8444`.
|
||||
|
||||
### 3. Configure Volare
|
||||
|
||||
@ -93,11 +109,11 @@ After you have set up the PDK, you can finally start developing your own designs
|
||||
|
||||
## Installing additional packages
|
||||
|
||||
For the arch based images you can install packages from the official arch repository using `pacman`.
|
||||
For the arch based images you can install packages from the [official arch repository](https://archlinux.org/packages/) using `pacman`.
|
||||
|
||||
```pacman -S <package_name>```
|
||||
|
||||
or you can also install packages from the AUR using paru.
|
||||
or you can also install packages from the [AUR](https://aur.archlinux.org/) using paru.
|
||||
|
||||
```paru <package_name>```
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
# OSIC Stacks - osicstacks-base-arch
|
||||
# OSIC Stacks - osicstacks-base-desktop
|
||||
# Base image for OSIC Stacks
|
||||
FROM greyltc/archlinux-aur:paru
|
||||
FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop
|
||||
|
||||
# Update packages
|
||||
RUN pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyterlab xterm
|
||||
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm
|
||||
ENV TERM=xterm EDITOR=gedit
|
||||
|
||||
# Clean cache
|
||||
RUN pacman -Scc
|
||||
|
@ -1,12 +1,14 @@
|
||||
# OSIC Stacks - osicstacks-base-web
|
||||
# Base image for OSIC Stacks
|
||||
FROM osicstacks-base-desktop
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as osicstacks-base-web
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install KASM VNC server
|
||||
RUN paru -S --noconfirm kasmvncserver-bin
|
||||
ENV DISPLAY=:1
|
||||
|
||||
# KASM requires the hostname binary to start
|
||||
RUN sudo pacman -S --noconfirm inetutils
|
||||
|
163
run.ps1
163
run.ps1
@ -1,76 +1,89 @@
|
||||
param([switch] $remote = $false)
|
||||
|
||||
Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green
|
||||
Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray
|
||||
|
||||
Write-Host ""
|
||||
wsl --install Ubuntu --no-launch
|
||||
wsl --update
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Please select an image index:"
|
||||
|
||||
$imageoptions = @(
|
||||
'analog-xk'
|
||||
'analog-xm'
|
||||
'analog-heavy'
|
||||
'digital-ator'
|
||||
'digital-icarus'
|
||||
'digital-heavy'
|
||||
'heavy'
|
||||
)
|
||||
|
||||
for($i = 0; $i -lt $imageoptions.Length; $i++) {
|
||||
$imageoption = $imageoptions[$i]
|
||||
Write-Host "$i - $imageoption" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
$imageindex = Read-Host -Prompt "Container image to initialize [0-$($imageoptions.Length-1)]"
|
||||
$imagename = $imageoptions[$imageindex]
|
||||
$containername = Read-Host -Prompt "Container instance name [default=$imagename]"
|
||||
if (!$containername) { $containername = $imagename }
|
||||
|
||||
$additionaloptions = ''
|
||||
if($remote) {
|
||||
$image = "git.1159.cl/mario1159/$imagename"
|
||||
$additionaloptions = '--pull always '
|
||||
} else {
|
||||
$image = $imagename
|
||||
}
|
||||
|
||||
$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]"
|
||||
|
||||
|
||||
if ($response -eq 'y') {
|
||||
$directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n"
|
||||
mkdir -Force $directory | Out-Null
|
||||
$additionaloptions = -join($additionaloptions, "-v ${directory}:/home/designer/shared ")
|
||||
}
|
||||
|
||||
$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]"
|
||||
|
||||
if ($response -eq 'y') {
|
||||
$response = Read-Host -Prompt "Write the additional arguments, for example -v <wsl_path>:<container_path>."
|
||||
$additionaloptions = -join($additionaloptions, $response)
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
$dockercommand = ("docker run -d " +
|
||||
"--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 " +
|
||||
"$additionaloptions "+
|
||||
$image)
|
||||
|
||||
wsl -d Ubuntu bash -ic $dockercommand
|
||||
|
||||
if ($?) {
|
||||
Write-Host "Container created successfully!" -ForegroundColor Green
|
||||
Write-Host "Enter the container with `"docker exec -it $containername bash`"" -ForegroundColor DarkGray
|
||||
} else {
|
||||
Write-Host "Container creation failed, see logs above" -ForegroundColor Red
|
||||
param([switch] $remote = $false)
|
||||
|
||||
Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green
|
||||
Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray
|
||||
|
||||
Write-Host ""
|
||||
wsl --install Ubuntu --no-launch
|
||||
wsl --update
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Please select an image index:"
|
||||
|
||||
$stacks_options = @(
|
||||
'analog-xk'
|
||||
'analog-xm'
|
||||
'analog-heavy'
|
||||
'digital-ator'
|
||||
'digital-icarus'
|
||||
'digital-heavy'
|
||||
'heavy'
|
||||
)
|
||||
|
||||
for($i = 0; $i -lt $stacks_options.Length; $i++) {
|
||||
$stack_option = $stacks_options[$i]
|
||||
Write-Host "[$($i+1)] - $stack_option" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
$stack_index = Read-Host -Prompt "Container image to initialize [1-$($stacks_options.Length)]"
|
||||
$selected_stack = $stacks_options[$stack_index-1]
|
||||
$container_name = Read-Host -Prompt "Container instance name [default=$selected_stack]"
|
||||
if (!$container_name) { $container_name = $selected_stack }
|
||||
|
||||
$execmode = ''
|
||||
while(!$execmode) {
|
||||
Write-Host "Please select an execution mode index"
|
||||
Write-Host '[1] - desktop' -ForegroundColor Cyan
|
||||
Write-Host '[2] - web' -ForegroundColor Cyan
|
||||
$response = Read-Host "Execution mode [1-2]"
|
||||
if ($response -eq '1') {
|
||||
$execmode = 'desktop'
|
||||
} elseif ($response -eq '2') {
|
||||
$execmode = 'web'
|
||||
} else {
|
||||
Write-Host "Unexpected respose, please try again" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
$additional_options = ''
|
||||
if($remote) {
|
||||
$image = "git.1159.cl/mario1159/$selected_stack-$execmode"
|
||||
$additional_options = '--pull always '
|
||||
} else {
|
||||
$image = "$selected_stack-$execmode"
|
||||
}
|
||||
|
||||
$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]"
|
||||
|
||||
if ($response -eq 'y') {
|
||||
$directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n"
|
||||
$additionaloptions = -join($additionaloptions, "-v ${directory}:/home/designer/shared ")
|
||||
}
|
||||
|
||||
$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]"
|
||||
|
||||
if ($response -eq 'y') {
|
||||
$response = Read-Host -Prompt "Write the additional arguments, for example -v <wsl_path>:<container_path>."
|
||||
$additionaloptions = -join($additionaloptions, $response)
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
$dockercommand = ("docker run -d " +
|
||||
"--name $container_name " +
|
||||
"-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 " +
|
||||
"$additional_options "+
|
||||
$image)
|
||||
|
||||
wsl -d Ubuntu bash -ic $dockercommand
|
||||
|
||||
if ($?) {
|
||||
Write-Host "Container created successfully!" -ForegroundColor Green
|
||||
Write-Host "Enter the container with `"docker exec -it $container_name bash`"" -ForegroundColor DarkGray
|
||||
} else {
|
||||
Write-Host "Container creation failed, see logs above" -ForegroundColor Red
|
||||
}
|
@ -2,12 +2,18 @@
|
||||
cd /home/designer
|
||||
|
||||
# Run VNC server
|
||||
export DISPLAY=:1
|
||||
eval $(vncserver -dry-run) &
|
||||
echo -e "password\npassword\n" | vncpasswd -u designer -w -r
|
||||
|
||||
# Wait for VNC server to start
|
||||
sleep 1
|
||||
sleep 2
|
||||
while ! xset q &>/dev/null;
|
||||
do
|
||||
echo "XServer not responsive, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "XServer has been found, running desktop environment"
|
||||
|
||||
# Run desktop environment (XFCE)
|
||||
xfce4-session --display=$DISPLAY
|
||||
|
@ -1,13 +1,18 @@
|
||||
# OSIC Stacks - analog-heavy-arch
|
||||
# Dev enviroment for analog circuits development using xschem and klayout.
|
||||
ARG BASE_IMG=osicstacks-base-native
|
||||
# OSIC Stacks - analog-heavy
|
||||
# Dev environment for analog design.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as analog-heavy
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install xschem glu magic-git klayout
|
||||
RUN sudo aur-install \
|
||||
xschem \
|
||||
glu \
|
||||
magic-git \
|
||||
klayout \
|
||||
netgen-lvs-git
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
@ -1,13 +1,16 @@
|
||||
# OSIC Stacks - analog-xk
|
||||
# Dev enviroment for analog circuits development using xschem and klayout.
|
||||
ARG BASE_IMG=osicstacks-base-native
|
||||
# Dev environment for analog circuits development using xschem and klayout.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as analog-xk
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install xschem klayout
|
||||
RUN sudo aur-install \
|
||||
xschem \
|
||||
klayout \
|
||||
netgen-lvs-git
|
||||
|
||||
RUN pip install gdsfactory --break-system-packages
|
||||
RUN pip install gf180 --upgrade --break-system-packages
|
||||
|
@ -1,13 +1,17 @@
|
||||
# OSIC Stacks - analog-xm
|
||||
# Dev enviroment for analog circuits development using xschem and magic.
|
||||
ARG BASE_IMG=osicstacks-base-native
|
||||
# Dev environment for analog circuits development using xschem and magic.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as analog-xm
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install xschem glu magic-git
|
||||
RUN sudo aur-install \
|
||||
xschem \
|
||||
glu \
|
||||
magic-git \
|
||||
netgen-lvs-git
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
@ -1,13 +1,17 @@
|
||||
# OSIC Stacks - analog-xk-arch
|
||||
# Dev enviroment for analog circuits development using xschem and klayout.
|
||||
ARG BASE_IMG=osicstacks-base-native
|
||||
# OSIC Stacks - digital-ator
|
||||
# Dev environment for digital circuits development using verilator and yosys.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as digital-ator
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install verilator gtkwave base-devel cmake
|
||||
RUN sudo aur-install \
|
||||
verilator \
|
||||
gtkwave \
|
||||
base-devel \
|
||||
cmake
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
30
stacks/digital-heavy.Dockerfile
Normal file
30
stacks/digital-heavy.Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
# OSIC Stacks - digital-heavy
|
||||
# Dev environment for digital design.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as digital-heavy
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install \
|
||||
verilator \
|
||||
iverilog \
|
||||
gtkwave \
|
||||
base-devel \
|
||||
cmake
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
||||
# - Desktop build
|
||||
FROM digital-heavy as digital-heavy-desktop
|
||||
|
||||
# Initialize the environment keeping container alive
|
||||
CMD ["sleep", "infinity"]
|
||||
|
||||
# - Web build
|
||||
FROM digital-heavy as digital-heavy-web
|
||||
|
||||
# Run VNC server & desktop environment
|
||||
CMD ["startserver"]
|
29
stacks/digital-icarus.Dockerfile
Normal file
29
stacks/digital-icarus.Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
# OSIC Stacks - digital-icarus
|
||||
# Dev environment for digital circuits development using icarus verilog and yosys.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as digital-icarus
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install \
|
||||
iverilog \
|
||||
gtkwave \
|
||||
base-devel \
|
||||
cmake
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
||||
# - Desktop build
|
||||
FROM digital-icarus as digital-icarus-desktop
|
||||
|
||||
# Initialize the environment keeping container alive
|
||||
CMD ["sleep", "infinity"]
|
||||
|
||||
# - Web build
|
||||
FROM digital-icarus as digital-icarus-web
|
||||
|
||||
# Run VNC server & desktop environment
|
||||
CMD ["startserver"]
|
35
stacks/heavy.Dockerfile
Normal file
35
stacks/heavy.Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
# OSIC Stacks - heavy
|
||||
# Dev environment for ic design.
|
||||
ARG BASE_IMG=osicstacks-base-desktop
|
||||
FROM $BASE_IMG as heavy
|
||||
|
||||
# Update packages
|
||||
RUN sudo pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN sudo aur-install \
|
||||
xschem \
|
||||
glu \
|
||||
magic-git \
|
||||
klayout \
|
||||
netgen-lvs-git \
|
||||
verilator \
|
||||
iverilog \
|
||||
gtkwave \
|
||||
base-devel \
|
||||
cmake
|
||||
|
||||
# Clean cache
|
||||
RUN sudo pacman -Scc
|
||||
|
||||
# - Desktop build
|
||||
FROM heavy as heavy-desktop
|
||||
|
||||
# Initialize the environment keeping container alive
|
||||
CMD ["sleep", "infinity"]
|
||||
|
||||
# - Web build
|
||||
FROM heavy as heavy-web
|
||||
|
||||
# Run VNC server & desktop environment
|
||||
CMD ["startserver"]
|
Loading…
Reference in New Issue
Block a user