Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Yushkovskiy committed Mar 11, 2020
1 parent 05169e6 commit f493ded
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
command: |
neuro config login-with-token $NEURO_TOKEN
neuro config docker
export IMAGE_NAME=neuromation/ml-recipe-midi-generator
export IMAGE_NAME=neuromation/ml-recipe-bone-age
export IMAGE_REF=$IMAGE_NAME:$CIRCLE_BUILD_NUM
export IMAGE_URI=image:$IMAGE_REF
make setup \
Expand All @@ -41,8 +41,8 @@ jobs:
docker tag $IMAGE_REF $IMAGE_NAME:latest
- docker/check
- docker/push:
image: neuromation/ml-recipe-midi-generator
tag: $CIRCLE_TAG,latest
image: neuromation/ml-recipe-bone-age
tag: latest


workflows:
Expand All @@ -53,7 +53,7 @@ workflows:
- build:
filters:
branches:
ignore: /.*/
ignore: CHANGEME
tags:
only:
- /.*/
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,30 @@ setup: ### Setup remote environment
for file in $(PROJECT_FILES); do $(NEURO) cp ./$$file $(PROJECT_PATH_STORAGE)/$$file; done
$(NEURO) exec --no-tty --no-key-check $(SETUP_JOB) "bash -c 'export DEBIAN_FRONTEND=noninteractive && $(APT) update && cat $(PROJECT_PATH_ENV)/apt.txt | xargs -I % $(APT) install --no-install-recommends % && $(APT) clean && $(APT) autoremove && rm -rf /var/lib/apt/lists/*'"
$(NEURO) exec --no-tty --no-key-check $(SETUP_JOB) "bash -c '$(PIP) -r $(PROJECT_PATH_ENV)/requirements.txt'"
ifdef __BAKE_SETUP
make __bake
endif
$(NEURO) --network-timeout 300 job save $(SETUP_JOB) $(CUSTOM_ENV_NAME)
$(NEURO) kill $(SETUP_JOB)

.PHONY: __bake
__bake: upload-code upload-data upload-notebooks
echo "#!/usr/bin/env bash" > /tmp/jupyter.sh
echo "jupyter notebook \
--no-browser \
--ip=0.0.0.0 \
--allow-root \
--NotebookApp.token= \
--NotebookApp.default_url=/notebooks/project-local/notebooks/demo.ipynb \
--NotebookApp.shutdown_no_activity_timeout=7200 \
--MappingKernelManager.cull_idle_timeout=7200 \
" >> /tmp/jupyter.sh
$(NEURO) cp /tmp/jupyter.sh $(PROJECT_PATH_STORAGE)/jupyter.sh
$(NEURO) exec --no-tty --no-key-check $(SETUP_JOB) \
"bash -c 'mkdir /project-local; cp -R -T $(PROJECT_PATH_ENV) /project-local'"
$(NEURO) exec --no-tty --no-key-check $(SETUP_JOB) \
"jupyter trust /project-local/notebooks/demo.ipynb"

##### STORAGE #####

.PHONY: upload-code
Expand Down

0 comments on commit f493ded

Please sign in to comment.