Skip to content

Instantly share code, notes, and snippets.

@marcelotournier
Created July 6, 2022 15:10
Show Gist options
  • Save marcelotournier/d29bb8baeeeb0d6c5baca3d1d93ad962 to your computer and use it in GitHub Desktop.
Save marcelotournier/d29bb8baeeeb0d6c5baca3d1d93ad962 to your computer and use it in GitHub Desktop.
Conditional requirements in python
tensorflow-aarch64>=2.8.2; platform_machine == 'aarch64'
tensorflow>=2.8.2; platform_machine != 'aarch64'
@marcelotournier
Copy link
Author

Precisei criar um requirements.txt em python para instalar uma versão diferente de tensorflow dependendo da arquitetura do servidor (arm64 ou x86). Esse snippet ajuda a definir "requerimentos condicionais".

A sintaxe é descrita em:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment