Skip to content

env variable pypi token 7 #63

env variable pypi token 7

env variable pypi token 7 #63

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Push Binary Release
on:
workflow_call:
secrets:
PYPI_TOKEN:
required: false
workflow_dispatch:
jobs:
build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [linux.4xlarge.nvidia.gpu]
python-version: [3.9, "3.10", "3.11", "3.12"]
cuda-tag: ["cu124"]
steps:
- name: Set up Environment
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
- name: Push to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
OFFICIAL_RELEASE: 1
run: |
ldd --version
conda create -y --name build_binary python=${{ matrix.python-version }}
conda info
python --version
conda run -n build_binary python --version
conda run -n build_binary pip install torch
conda run -n build_binary pip install numpy
conda run -n build_binary pip install fbgemm-gpu
conda run -n build_binary python -m pip install -r requirements.txt
conda run -n build_binary python -c "import torch.distributed"
echo "torch.distributed succeeded"
conda run -n build_binary python -c "import skbuild"
echo "skbuild succeeded"
conda run -n build_binary python -c "import numpy"
echo "numpy succeeded"
rm -r dist || true
conda run -n build_binary \
python setup.py bdist_wheel \
--python-tag=${{ matrix.python-tag }}
conda run -n build_binary \
python -c "import fbgemm_gpu"
conda run -n build_binary \
python -c "import torchrec"
conda run -n build_binary python -m pip install twine
conda run -n build_binary \
python -m twine upload \
--username __token__ \
--password "$PYPI_TOKEN" \
--skip-existing \
dist/torchrec-*.whl