# use venv to make a virtual environment named env
python3 -m venv env
# activate the environment
source env/bin/activate
# install cffconvert in it
pip install cffconvert
Note: this option needs sudo rights.
sudo -H python3 -m pip install cffconvert
Make an environment definition file environment.yml
with the following contents:
name: env
channels:
- conda-forge
- defaults
dependencies:
- pip
- pip:
- cffconvert
Then run:
conda env create --file environment.yml
conda activate env
cffconvert
comes with an interface for
running as a Google Cloud Function. We set it up here
https://bit.ly/cffconvert for the time being / as long as we have
enough credits on the Google Cloud Function platform.
Really, all the Google Cloud interface does is get any supplied URL parameters, and use them as if they had been entered as command line arguments. For more detailed explanation and examples, see https://bit.ly/cffconvert.
On Google Cloud Function, set requirements.txt
to:
cffconvert[gcloud]
and use the following as main.py
:
from cffconvert.gcloud.gcloud import cffconvert
def main(request):
return cffconvert(request)
Build the Docker container
cd <project root>
docker build --tag cffconvert:2.0.0 .
docker build --tag cffconvert:latest .
Build the Docker container
cd <where your CITATION.cff is>
docker run --rm -ti -v ${PWD}:/app cffconvert