Adding bitbucket library in code environment UI
I am looking to add an R library in a private repo in bitbucket to a code env, I have tested adding it as a project level library as per this document (https://knowledge.dataiku.com/latest/courses/governance/collaboration/git-projects.html) which is working fine.
However ideally I would have the package in the code env so it is more widely available. I have successfully installed packages in the code env from github using this syntax: git+https://github.com/<package>.git but I cannot seem to get it to work with a bitbucket link. The error I am getting just says that it is not available. For reference I am using Dataiku version 9.0.5
Is there anything I am overlooking? Or is this only available through github?
Answers
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,237 Dataiker
Hi @ak12
,Is your bitbucket repo public or private? If it's private repo you may need to create an app password:
https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/
And include this in your URL:
git+https://USER_NAME:APP_PASSWORD@GIT_URL/PATH_TO_YOUR_REPO.git
Thanks,
-
Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 365 Dataiker
Hi,
If we are talking about R code envs, the quick answer is no, it's not possible to install R packages from the git repositories from DSS UI.
In R, to install the package from Git, you need to do this manually from the CLI using either "devtools" or "remotes" R packages. This will require something like this:
install.packages('devtools')
require(devtools)
devtools::install_github("dmlc/xgboost")
# or:</code>library(devtools)<br />install_github("dmlc/xgboost")<code>
which is not possible from DSS UI as we search for packages only within the R CRAN mirror set in the code env config.The syntax for the package:
git+https://github.com/<package>.git
works for python code env as you can use this syntax in pip install commands but this doesn't work for R.