Skip to content

Commit

Permalink
script updates for home server
Browse files Browse the repository at this point in the history
  • Loading branch information
gagandaroach committed Sep 29, 2021
1 parent 126a940 commit a985088
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
3 changes: 1 addition & 2 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ RUN python3 -m pip install large_image
RUN apt install cmake cython -y
RUN python3 -m pip install -e .

WORKDIR /srv

WORKDIR /host
RUN rm -rf /tmp
8 changes: 8 additions & 0 deletions dev/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Stylegan1 Tensorflow 1.15 Docker container
# Author: Gagan Daroach <[email protected]>

container_name="$(cat container_name.txt)"
echo 'Calling build "$container_name"'
# build docker container
docker build . -t $container_name:latest
3 changes: 0 additions & 3 deletions dev/build_singularity.sh

This file was deleted.

1 change: 1 addition & 0 deletions dev/container_name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dgx_researcher
26 changes: 15 additions & 11 deletions dev/deploy.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash
# TO BE RUN ON MSOE dh-dgx node
#
# Stylegan1 Tensorflow 1.15 Docker container
# Author: Gagan Daroach <[email protected]>
user=$USER
container_name="${user}_researcher_dev"
container_name="$(cat container_name.txt)"
echo ">>>> Loaded container name: $container_name <<<<"

# build docker container
docker build . -t $container_name:latest
# stop container if it is running currently.
docker stop $container_name
docker rm $container_name

nvidia-docker run --name $container_name --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v /data:/data -v ~:/srv/hosthome -it $container_name
# user="-u 1000:1000"
user=""
volumes="-v /home/gagan/research:/host/research -v /srv:/host/srv"
workdir="-w /host/research"
ports="-p 8888:8888"
gpus="--gpus all"
docker_args="$volumes $ports $user $gpus $workdir --name $container_name --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm"
echo ">>>> Docker run jupyter lab with args: <<<<"
echo "$docker_args"
echo ""
docker run $docker_args $container_name jupyter-lab
# nvidia-docker run --name $container_name --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v /data:/data -v ~:/srv/hosthome -it $container_name
5 changes: 5 additions & 0 deletions dev/singularity_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
container_name="$(cat container_name.txt)"
echo "Container name: $container_name"
# docker build . -t container_name
# singularity build mcw_dev_img.sif Dockerfile

0 comments on commit a985088

Please sign in to comment.