mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-17 00:23:14 +00:00
Add MocapNET
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
FROM tensorflow/tensorflow:latest-gpu
|
||||
|
||||
ARG user_id
|
||||
ARG root_psw="12345678"
|
||||
ARG user_psw="ok"
|
||||
ARG user_name=user
|
||||
|
||||
# Installs the necessary pkgs.
|
||||
RUN \
|
||||
echo "**** packages installation ****" \
|
||||
&& apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub \
|
||||
&& apt-get update && apt-get install -y \
|
||||
vim \
|
||||
build-essential \
|
||||
cmake \
|
||||
libopencv-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libglew-dev \
|
||||
libpthread-stubs0-dev \
|
||||
git \
|
||||
virtualenv \
|
||||
time \
|
||||
sudo \
|
||||
wget \
|
||||
nano \
|
||||
python3.10-venv \
|
||||
&& echo "**** python pip update ****" \
|
||||
&& /usr/bin/python3 -m pip install --upgrade pip \
|
||||
&& echo "**** aliases for l and ll commands creation ****" \
|
||||
&& echo -e 'ls --color=auto "$@"' > /usr/bin/l \
|
||||
&& echo -e 'ls -lah --color=auto "$@"' > /usr/bin/ll \
|
||||
&& chmod +x /usr/bin/ll /usr/bin/l \
|
||||
&& echo "**** history-search-backward by pressing F8 ****" \
|
||||
&& sed -i 's/# "\\e\[5~": history-search-backward/"\\e\[19~": history-search-backward/' /etc/inputrc \
|
||||
&& echo "**** root password creation ****" \
|
||||
&& echo "root:${root_psw}" | chpasswd \
|
||||
&& echo "**** user creation ****" \
|
||||
&& useradd -m -s /usr/bin/bash -u ${user_id} -G sudo ${user_name} \
|
||||
&& echo "${user_name}:${user_psw}" | chpasswd \
|
||||
&& chown -R ${user_name}:${user_name} /home/${user_name}/ \
|
||||
&& mkdir /home/${user_name}/workspace/ \
|
||||
&& chown -R user:user /home/${user_name}/workspace
|
||||
|
||||
|
||||
USER ${user_name}
|
||||
WORKDIR /home/${user_name}/
|
||||
|
||||
RUN cd /home/${user_name}/workspace && git clone -b mnet4 https://github.com/FORTH-ModelBasedTracker/MocapNET && cd MocapNET/src/python/mnet4/ && ./setup.sh --collab
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
# This script builds and runs a docker image for local use.
|
||||
|
||||
#Although I dislike the use of docker for a myriad of reasons, due needing it to deploy on a particular machine
|
||||
#I am adding a docker container builder for the repository to automate the process
|
||||
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$DIR"
|
||||
cd ..
|
||||
REPOSITORY=`pwd`
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
NAME="mocapnet"
|
||||
dockerfile_pth="$DIR"
|
||||
mount_pth="$REPOSITORY"
|
||||
|
||||
# update tensorflow image
|
||||
docker pull tensorflow/tensorflow:latest-gpu
|
||||
|
||||
# build and run tensorflow
|
||||
docker build \
|
||||
-t $NAME \
|
||||
$dockerfile_pth \
|
||||
--build-arg user_id=$UID
|
||||
|
||||
docker run -d \
|
||||
--gpus all \
|
||||
--shm-size 8G \
|
||||
-it \
|
||||
--name $NAME-container \
|
||||
-v $mount_pth:/home/user/workspace \
|
||||
$NAME
|
||||
|
||||
|
||||
docker ps -a
|
||||
|
||||
OUR_DOCKER_ID=`docker ps -a | grep mocapnet | cut -f1 -d' '`
|
||||
echo "Our docker ID is : $OUR_DOCKER_ID"
|
||||
echo "Attaching it using : docker attach $OUD_DOCKER_ID"
|
||||
docker attach $OUR_DOCKER_ID
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user