mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-23 08:26:06 +00:00
slightly tweaked mocapnet alt container
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
FROM nvidia/cuda:11.6.1-devel-ubuntu20.04
|
||||
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN mkdir /python_install
|
||||
RUN mkdir /model_code
|
||||
|
||||
WORKDIR /python_install
|
||||
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 \
|
||||
curl \
|
||||
software-properties-common \
|
||||
rsync \
|
||||
apt-utils \
|
||||
ffmpeg \
|
||||
unzip
|
||||
|
||||
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
|
||||
&& apt-get install git-lfs \
|
||||
&& git lfs install
|
||||
|
||||
RUN add-apt-repository ppa:deadsnakes/ppa
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y python3.10 python3.10-venv python3.10-dev python3.10-full python3.10-distutils
|
||||
|
||||
# COPY requirements.txt .
|
||||
# Install Python dependencies
|
||||
RUN python3.10 -m venv python \
|
||||
&& python/bin/pip install --upgrade pip wheel setuptools \
|
||||
&& . python/bin/activate
|
||||
|
||||
WORKDIR /model_code
|
||||
COPY . /model_code/MocapNET
|
||||
RUN cd /model_code/MocapNET && ./initialize.sh
|
||||
# RUN cd /home/${user_name}/workspace && git clone https://github.com/FORTH-ModelBasedTracker/MocapNET && cd MocapNET && ./initialize.sh --collab
|
||||
|
||||
+44
@@ -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