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
50 changes: 7 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,16 @@
version: 2

defaults: &defaults
docker:
- image: circleci/python:3.7.2
working_directory: ~/project

prepare_venv: &prepare_venv
run:
name: Create venv
command: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install dvc
chown -R $USER:$USER ./packages/neural_network_model/neural_network_model/datasets
version: 2.1

jobs:
train_and_upload_neural_network_model:
build:
docker:
- image: circleci/python:3.6.4-stretch
working_directory: ~/project
- image: cimg/python:3.10
steps:
- checkout
- *prepare_venv
- run:
name: Install requirements
command: |
. venv/bin/activate
pip install -r packages/neural_network_model/requirements.txt
- run:
name: Fetch DVC data and check for changes
command: |
source venv/bin/activate
dvc pull -f
PYTHONPATH=. dvc repro train.dvc
- run:
name: Publish model to Gemfury
command: |
. venv/bin/activate
chmod +x ./scripts/publish_model.sh
./scripts/publish_model.sh ./packages/neural_network_model/
name: Check Python Version
command: python --version

workflows:
version: 2
test-all:
build_workflow:
jobs:
- train_and_upload_neural_network_model
# filters:
# branches:
# only:
# - master
- build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#### Setup
setup with (using a virtualenv):
`pip install -r packages/neural_network_model/requirements.txt`
This is my CI test