Skip to content

Commit

Permalink
Fixed glx
Browse files Browse the repository at this point in the history
  • Loading branch information
ddetommaso committed Feb 1, 2024
1 parent 9e18c7e commit 06badf5
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 45 deletions.
92 changes: 50 additions & 42 deletions .dockyman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ USER_UID := $(shell id -u)
USER_GID := $(shell id -g)
LINUX_DISTRO := $(shell awk -F= '/^ID=/{print $$2}' /etc/os-release)
LINUX_VERSION := $(shell awk -F= '/^VERSION_ID=/{print $$2}' /etc/os-release)
GPU_PROFILE := no-gpu

export USER_UID
export USER_GID
export GPU_PROFILE

.DEFAULT_GOAL := default

Expand Down Expand Up @@ -107,6 +109,7 @@ DOCKYMAN_BUILD_BASE_COMMAND := ${DOCKYMAN_BASE_COMMAND} up --remove-orphans
DOCKYMAN_BUILD_LOCAL_COMMAND := ${DOCKYMAN_LOCAL_COMMAND} up --remove-orphans

DOCKYMAN_RUN_COMMAND := ${DOCKER_COMPOSE} ${COMPOSE_RUN} up --remove-orphans
DOCKYMAN_STOP_COMMAND := ${DOCKER_COMPOSE} ${COMPOSE_RUN} ${ENV_BUILD} down --remove-orphans

DOCKYMAN_BASE_SERVICES := $(shell USER_UID=${USER_UID} USER_GID=${USER_GID} ${DOCKYMAN_BASE_COMMAND} config --services)
DOCKYMAN_LOCAL_SERVICES := $(shell USER_UID=${USER_UID} USER_GID=${USER_GID} ${DOCKYMAN_LOCAL_COMMAND} config --services)
Expand Down Expand Up @@ -259,7 +262,7 @@ help:
@echo " help Display this help message"


default:
default: stop
@if grep -q '^PROFILE=development' ${ENV_FILE_BUILD}; then \
$(MAKE) install-all && $(MAKE) build && $(MAKE) create_env; \
else \
Expand All @@ -282,77 +285,73 @@ create_env:
echo "GPU_PROFILE=no-gpu" >> ${ENV_FILE_RUN}; \
fi

build-base-nocache:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans

@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Building base image from service '$$service' ..."; \
set -e; \
ACTION=build_base_nocache ${DOCKYMAN_BASE_COMMAND} run $$service; \
done
build-base-nocache: remove-build-base build-base

build-base:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans
@echo
@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Building base image from service '$$service' ..."; \
set -e; \
echo "Building base image from service '$$service' ..."; \
ACTION=build_base ${DOCKYMAN_BASE_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-base

remove-build-base:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans
@echo
@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Removing base image from service '$$service' ..."; \
set -e; \
echo "Removing base image from service '$$service' ..."; \
ACTION=clean_base ${DOCKYMAN_BASE_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-base

remove-build-local:
@for service in $(DOCKYMAN_LOCAL_SERVICES); do \
set -e; \
echo "Cleaning image from service '$$service' ..."; \
ACTION=clean ${DOCKYMAN_LOCAL_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-local

build-local:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans
@echo
@for service in $(DOCKYMAN_LOCAL_SERVICES); do \
echo "Building local image from service '$$service' ..."; \
set -e; \
echo "Building local image from service '$$service' ..."; \
ACTION=build_local ${DOCKYMAN_LOCAL_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-local

build-local-nocache: remove-build-local build-local

pull:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans
@echo
@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Pulling base image from service '$$service' ..."; \
set -e; \
echo "Pulling base image from service '$$service' ..."; \
ACTION=pull ${DOCKYMAN_BASE_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-base

push:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans

@echo
@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Pushing base image from service '$$service' ..."; \
set -e; \
echo "Pushing base image from service '$$service' ..."; \
ACTION=push ${DOCKYMAN_BASE_COMMAND} run $$service; \
set +e; \
done
$(MAKE) stop-base

clean:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans

@echo "Cleaning volumes ...";
@${DOCKYMAN_LOCAL_COMMAND} down -v;
@echo "Removing env ${ENV_FILE_RUN} ... ";
@rm -f ${ENV_FILE_RUN};
@for service in $(DOCKYMAN_BASE_SERVICES); do \
echo "Cleaning image from service '$$service' ..."; \
set -e; \
ACTION=clean ${DOCKYMAN_BASE_COMMAND} run $$service; \
done
clean: remove-build-base remove-build-local

dev:
@echo
@echo "Configuring DEVELOPMENT PROFILE..."
@if grep -q '^PROFILE=' ${ENV_FILE_BUILD}; then \
sed -i 's/^PROFILE=.*/PROFILE=development/' ${ENV_FILE_BUILD}; \
Expand All @@ -363,6 +362,7 @@ dev:
$(MAKE) create_env;

production: remove-build-base
@echo
@echo "Configuring PRODUCTION PROFILE..."
@if grep -q '^PROFILE=' ${ENV_FILE_BUILD}; then \
sed -i 's/^PROFILE=.*/PROFILE=production/' ${ENV_FILE_BUILD}; \
Expand All @@ -378,19 +378,27 @@ init-host:
build: build-base build-local
@docker network prune -f

rebuild: clean build-base-nocache build-local
rebuild: stop build-base-nocache build-local-nocache

stop:
stop-base:
${DOCKYMAN_BASE_COMMAND} down --remove-orphans

stop-local:
${DOCKYMAN_LOCAL_COMMAND} down --remove-orphans

stop: stop-base stop-local

log:
bash ${SCRIPTS}/logLocalInfo.sh > ../lastrun.log

dockyman-run:
${DOCKYMAN_RUN_COMMAND}

run: default log init-host dockyman-run stop
dockyman-stop:
${DOCKYMAN_STOP_COMMAND}

run: default log init-host dockyman-run dockyman-stop


clean-docker:
@docker network prune -f
Expand Down
1 change: 0 additions & 1 deletion .dockyman/profiles/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ services:
- XDG_DATA_DIRS=${XDG_DATA_DIRS:?err}
- QT_X11_NO_MITSHM=1
- NO_AT_BRIDGE=1
- LIBGL_ALWAYS_INDIRECT=1

extends:
file: gpus.yaml
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/CI-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dockyman build base image(s)

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build and Docker image
run: |
make -C .dockyman build
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml → .github/workflows/CI-push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Release
name: Dockyman build/push base image(s)

on:
release:
Expand All @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build and push Docker image
run: |
Expand Down

0 comments on commit 06badf5

Please sign in to comment.