-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alternative setup instructions through Anaconda #139
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,65 @@ Requirements | |
Getting Started | ||
--------------- | ||
|
||
* Install latest development code from source | ||
#. Run the following command to install the required libraries: | ||
|
||
.. code-block:: bash | ||
.. code-block:: bash | ||
|
||
git clone --recursive https://github.com/clara-parabricks/VariantWorks.git | ||
cd VariantWorks | ||
pip install -r python-style-requirements.txt | ||
pip install -r requirements.txt | ||
pip install -e . | ||
# Install pre-push hooks to run tests | ||
ln -nfs $(readlink -f hooks/pre-push) .git/hooks/pre-push | ||
apt install zlib1g-dev libcurl4-gnutls-dev libssl-dev libbz2-dev liblzma-dev | ||
|
||
#. `htslib` is required and can be installed from source by following the instructions in: https://github.com/samtools/htslib#building-htslib | ||
|
||
|
||
#. Install latest development code from source: | ||
|
||
.. code-block:: bash | ||
|
||
git clone https://github.com/clara-parabricks/VariantWorks.git | ||
cd VariantWorks | ||
pip install -r requirements-python-style.txt | ||
pip install -r requirements.txt | ||
pip install -e . | ||
# Install pre-push hooks to run tests | ||
ln -nfs $(readlink -f hooks/pre-push) .git/hooks/pre-push | ||
|
||
Alternative Anaconda Installation | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. Clone VariantWorks repository and change directory: | ||
|
||
.. code-block:: bash | ||
|
||
git clone https://github.com/clara-parabricks/VariantWorks.git | ||
cd VariantWorks | ||
|
||
|
||
#. Create & activate a new environment with the required OS libraries: | ||
|
||
.. code-block:: bash | ||
|
||
conda env create --name <ENVIRONMENT_NAME> -f ./environment.yml | ||
conda activate <ENVIRONMENT_NAME> | ||
|
||
#. Some Python packages depends on the headers and shared libraries which were installed in the previous step, | ||
therefore before executing `pip`, run the following command: | ||
|
||
.. code-block:: bash | ||
|
||
export LDFLAGS=-L<ENVIRONMENT_PATH>/lib | ||
export CPPFLAGS=-I<ENVIRONMENT_PATH>/include | ||
|
||
The environment path can be queried by running: | ||
|
||
.. code-block:: bash | ||
|
||
conda info --envs | ||
|
||
#. Install Python requirements and VariantWorks package from source | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could not combine the pip installation step with the
because we don't know the user-defined environment location prior to running the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I think it's okay to keep them separated for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using explicit package names in the
also results in the following error when creating the environment:
|
||
|
||
.. code-block:: bash | ||
|
||
pip install -r requirements-python-style.txt | ||
pip install -r requirements.txt | ||
pip install -e . | ||
# Install pre-push hooks to run tests | ||
ln -nfs $(readlink -f hooks/pre-push) .git/hooks/pre-push |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright 2020 NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.7 | ||
- pip | ||
- zlib | ||
- libcurl | ||
- openssl | ||
- bzip2 | ||
- xz | ||
- bioconda::htslib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of defining these env variables, I tried to pass to the
pip install -r requirements.txt
command the following arguments:or even add these arguments to the relevant entries in the requirements.txt files:
Both of these options result in disabling the use of wheel files and build from the source all the packages in
requirements.txt
, as described in pypa/pip#4118 (same for the--install-option
argument)And this causes a failure to install the
nemo-toolkit
&pysam
. ( We can overcome this issue, by using an additional requirements file- one for PyPI packages that are built from source successfully need the--global-option=build_ext
command argument to build against the shared libraries and another one for packages that fails and require a precompiled .whl installation. (But in my opinion, this would confuse the user more)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we can take all the requirements from
requirements.txt
and find the corresponding packages in the Anaconda cloud, move them to theenvironment.yml
file and leave inside therequirements.txt
only the packages that do not have an Anaconda package. this way, a user that uses Anaconda will only only to use theconda env create command