Commit 86cb1e09 authored by Omkar Salpekar's avatar Omkar Salpekar Committed by Facebook GitHub Bot
Browse files

Linux CPU job should respect set Python version (#3477)

Summary:
Reintroduce a conda environment within which we will do all deps installation, audio builds, and tests runs. This conda environment will use the python version set by the GHA job - previously this just defaulted to using the system 3.10 python which was default inside the container.

Pull Request resolved: https://github.com/pytorch/audio/pull/3477

Reviewed By: mthrok

Differential Revision: D47414572

Pulled By: osalpekar

fbshipit-source-id: 80760f82c7726205b29812d576e498db2a7a80a0
parent 155d1bae
...@@ -13,12 +13,17 @@ set -e ...@@ -13,12 +13,17 @@ set -e
case "$(uname -s)" in case "$(uname -s)" in
Darwin*) Darwin*)
os=MacOSX;; os=MacOSX
eval "$($(which conda) shell.bash hook)"
;;
*) *)
os=Linux os=Linux
eval "$("/opt/conda/bin/conda" shell.bash hook)" eval "$("/opt/conda/bin/conda" shell.bash hook)"
esac esac
conda create -n ci -y python="${PYTHON_VERSION}"
conda activate ci
# 1. Install PyTorch # 1. Install PyTorch
if [ -z "${CUDA_VERSION:-}" ] ; then if [ -z "${CUDA_VERSION:-}" ] ; then
if [ "${os}" == MacOSX ] ; then if [ "${os}" == MacOSX ] ; then
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
set -e set -e
eval "$(/opt/conda/bin/conda shell.bash hook)" eval "$($(which conda) shell.bash hook)"
conda activate ci
python -m torch.utils.collect_env python -m torch.utils.collect_env
env | grep TORCHAUDIO || true env | grep TORCHAUDIO || true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment