Restructuring build flows to choose user as default but be overridable

This commit is contained in:
2026-05-11 01:15:45 -05:00
parent 3fe59e9740
commit bfb1a8e95e
13 changed files with 276 additions and 38 deletions

View File

@@ -5,4 +5,6 @@
# set -o errunset ## To exit if a variable is referenced but not set
CONTAINER="ai-tools"
_HOME="${HOME}"
CONTAINER="ai-tools"
CONTAINER_HOME="${_HOME}"

View File

@@ -7,11 +7,6 @@
# set -o errunset ## To exit if a variable is referenced but not set
function set_routs() {
sudo iptables -t nat -I OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-ports 8080
sudo iptables -t nat -I OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-ports 4433
}
function main() {
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
@@ -24,20 +19,19 @@ function main() {
fi
DOWNLOAD_HOST="${HOME}/Downloads"
DOWNLOAD_CONTAINER="${HOME}/Downloads"
DOWNLOAD_CONTAINER="${CONTAINER_HOME}/Downloads"
CODING_HOST="${HOME}/Coding"
CODING_CONTAINER="${HOME}/Coding"
CODING_CONTAINER="${CONTAINER_HOME}/Coding"
# set_routs
# sudo sysctl net.ipv4.ip_unprivileged_port_start=80
# -p 80:80 \
# -p 443:443 \
# sudo sysctl net.ipv4.ip_unprivileged_port_start=80
# podman run -m 4G \
# -p 80:80 \
# -p 443:443 \
# podman run -m 4G \
podman run -d -m 4G \
--annotation run.oci.cdi.devices=all \
-e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility \
-e HOME="${HOME}" \
-e HOME="${CONTAINER_HOME}" \
-v "${DOWNLOAD_HOST}":"${DOWNLOAD_CONTAINER}" \
-v "${CODING_HOST}":"${CODING_CONTAINER}" \
"${CONTAINER}:latest"