Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export USER := $(shell whoami)
export NB_GPUS := 2
export NB_CPUS := 0 # this value is ignored if NB_GPUS is specified.
export REGION := gra
export PROJECT_DATA_RIGHTS := ro
export JOB=$(shell cat job.json | jq '.id')

dummy := $(shell touch artifacts)
include ./artifacts
# build locally the docker image
Expand All @@ -19,17 +22,21 @@ deploy-job:
ovhai job run \
--gpu ${NB_GPUS} \
--cpu ${NB_CPUS} \
--name ${IMAGE_NAME}-${USER}-${NB_GPUS}GPU-${NB_CPUS}CPU \
--name ${PROJECT_NAME}-${USER}-${NB_GPUS}GPU-${NB_CPUS}CPU \
--label user=${USER}\
--volume lab-cv-${PROJECT_NAME}-data@${REGION}:/workspace/data:rw \
--volume lab-cv-${PROJECT_NAME}-notebook@${REGION}:/workspace/notebook:rw \
--volume lab-cv-${PROJECT_NAME}-code@${REGION}:/workspace/code:rw \
--volume share@${REGION}:/workspace/share:rw \
--volume ${PROJECT_NAME}-home@${REGION}/${USER}:/workspace/home/${USER}:rwd \
--volume ${PROJECT_NAME}-home@${REGION}:/workspace/home:ro \
--volume cclabeler-data@${REGION}:/workspace/cclabeler:ro \
--volume ${PROJECT_NAME}-data@${REGION}:/workspace/data:${PROJECT_DATA_RIGHTS} \
--volume lab-cv-${PROJECT_NAME}-notebook@${REGION}:/workspace/notebook:ro \
--volume lab-cv-${PROJECT_NAME}-code@${REGION}:/workspace/code:ro \
--volume share@${REGION}:/workspace/share:ro \
--output json \
ghcr.io/datalab-mi/${IMAGE_NAME}:${VERSION} > job.json \
$(command)
@cat job.json | jq '.status.jobUrl'

#usage: make stop-job JOB=xxxxx
#usage: for a specific job do 'make stop-job JOB=xxxxx' else read the last file job.json
stop-job:
ovhai job stop $(JOB)

Expand Down
11 changes: 10 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ numpy==1.20.3
opencv_python==4.5.3.56
h5py==3.4.0
onnxruntime==1.8.1
matplotlib
Pillow==8.4.0
scikit-learn==1.0.2
openpyxl==3.0.9
wget==3.2
seaborn==0.11.2
matplotlib==3.4.3
scikit-learn==1.0.2
easydict==1.9
tensorboardX==2.4.1
onnx==1.11.0
openpyxl==3.0.9