Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using a different conda-build root directory

Tags:

conda

anaconda

I am creating my own conda recipe which I checkout with git. The repository is few gigs. Instead of doing a checkout in ~/conda-bld, I would like it to checkout in /ssd, which is going to be faster. How can I specify it? Also, how can I specify git depth when doing a clone?

like image 570
NinjaGaiden Avatar asked Sep 01 '16 15:09

NinjaGaiden


1 Answers

I would like it to checkout in /ssd which is going to be faster. How can I specify it?

conda-build chooses a root directory for all of its work in the following way:

  1. If CONDA_BLD_PATH is defined in your environment, use that
  2. Otherwise, if a file named ~/.condarc exists, check if conda-build/root-dir is defined. For example:
   # .condarc
   conda-build:
     root-dir: /ssd/conda-bld
  1. Otherwise, try $(conda info --root)/conda-bld
  2. If that location isn't writable, use ~/conda-bld

(See the source code for these steps if you're curious.)

Also, how can I specify git depth when doing a clone?

You can use git_depth in the source section of meta.yaml:

# meta.yaml
package:
  name: foo
  version: '1.0'

source:
  git_url: https://github.com/foo/bar
  git_depth: 1

Note: I do not recommend using git_depth. It won't work well if you also specify a git_tag -- If the tag is not visible within N commits (for git_depth: N) of the HEAD, then your checkout will fail.

like image 57
Stuart Berg Avatar answered Oct 31 '22 18:10

Stuart Berg