forked from zhouhaoyi/Informer2020
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker, makefile and conda environment
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM continuumio/miniconda3:4.7.12 | ||
|
||
ADD ./environment.yml ./environment.yml | ||
|
||
RUN conda install -n base -c conda-forge mamba && \ | ||
mamba env update -n base -f ./environment.yml && \ | ||
conda clean -afy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
IMAGE := informer | ||
ROOT := $(shell dirname $(realpath $(firstword ${MAKEFILE_LIST}))) | ||
PARENT_ROOT := $(shell dirname ${ROOT}) | ||
PORT := 8888 | ||
|
||
DOCKER_PARAMETERS := \ | ||
--user $(shell id -u) \ | ||
-v ${ROOT}:/app \ | ||
-w /app \ | ||
-e HOME=/tmp | ||
|
||
init: | ||
docker build -t ${IMAGE} . | ||
|
||
jupyter: | ||
docker run -d --rm ${DOCKER_PARAMETERS} -e HOME=/tmp -p ${PORT}:8888 ${IMAGE} \ | ||
bash -c "jupyter lab --ip=0.0.0.0 --no-browser --NotebookApp.token=''" | ||
|
||
run_module: .require-module | ||
docker run -i --rm ${DOCKER_PARAMETERS} \ | ||
${IMAGE} ${module} | ||
|
||
bash_docker: | ||
docker run -it --rm ${DOCKER_PARAMETERS} ${IMAGE} | ||
|
||
.require-module: | ||
ifndef module | ||
$(error module is required) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: regional_pmm | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.6 | ||
- pip | ||
- matplotlib==3.1.1 | ||
- numpy==1.19.4 | ||
- pandas==0.25.1 | ||
- scikit-learn==0.21.3 | ||
- pytorch==1.8.0 |