Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

.gitlab-ci.yml 2.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  1. ---
  2. image: python:latest
  3. variables:
  4. XDG_CACHE_HOME: $CI_PROJECT_DIR/.cache # Ensure tools use accessible cache directory.
  5. stages:
  6. - validate
  7. - replicate
  8. # Ensure files in repository adhere to convention standards.
  9. validate:
  10. stage: validate
  11. cache:
  12. paths:
  13. - $XDG_CACHE_HOME/pre-commit
  14. variables:
  15. # TODO: Refactor notebooks and readd pre-commit checks.
  16. # Notebooks aren't important at the moment, so disabling checks.
  17. SKIP: "nbqa-flake8,nbqa-mypy,nbqa-pydocstyle,nbqa-isort,nbqa-pyupgrade"
  18. script:
  19. - pip install pre-commit
  20. - pre-commit run --all-files
  21. # Ensure results can be replicated on other machines.
  22. replicate:
  23. stage: replicate
  24. cache:
  25. paths:
  26. - $XDG_CACHE_HOME/pypoetry
  27. variables:
  28. # Export AWS credentials.
  29. AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
  30. AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
  31. AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
  32. # Define DVC remote cache location.
  33. URL_CACHE_DVC: s3://mraxilus-dvc-public/gitlab/thesis-doctorate
  34. script:
  35. # Install AWS.
  36. - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
  37. - unzip awscliv2.zip &> /dev/null
  38. - ./aws/install
  39. - aws --version
  40. - aws s3 ls $URL_CACHE_DVC
  41. # Install pyenv.
  42. - curl -L https://pyenv.run | bash
  43. - export PATH="~/.pyenv/bin:~/.pyenv/shims:$PATH"
  44. - pyenv install $(cat .python-version)
  45. - pyenv global $(cat .python-version)
  46. - python3 --version
  47. - pyenv --version
  48. # Install poetry.
  49. - curl -L https://install.python-poetry.org | python3 -
  50. - export PATH="~/.local/bin:$PATH"
  51. - poetry --version
  52. - poetry run which python
  53. # Install project dependencies.
  54. - poetry install --no-dev
  55. # Verify DVC configuration.
  56. - poetry run dvc config cache.type copy # Links fail for some reason.
  57. - poetry run dvc cache dir
  58. - poetry run dvc doctor
  59. - poetry run dvc status --cloud --remote amazon
  60. # Download cached data.
  61. - poetry run dvc fetch --remote amazon
  62. - poetry run dvc checkout --relink
  63. # Visualize the pipelines.
  64. - poetry run dvc dag --full clean@air
  65. - poetry run dvc dag --full clean@synthetic
  66. - poetry run dvc dag --full clean@water
  67. # Check that pipeline can be reproduced.
  68. - poetry run dvc repro --dry # Avoid running actual computations.
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...