OpenMined / sycret

Function Secret Sharing library for Python and Rust with hardware acceleration
https://openmined.github.io/sycret/
Apache License 2.0
54 stars 9 forks source link

Remove manylinux tag #52

Closed nph4rd closed 3 years ago

nph4rd commented 3 years ago

Description

This change will allow us to publish the package within a docker container.

Affected Dependencies

How has this been tested?

Tested locally.

Checklist

tholop commented 3 years ago

Thanks! Let's find a way to test the release packages without spamming PyPI (e.g. https://test.pypi.org/) and document it for future uses.

nph4rd commented 3 years ago

Thanks! Let's find a way to test the release packages without spamming PyPI (e.g. https://test.pypi.org/) and document it for future uses.

Hey @tholop - tried to use TestPyPI but did not succeed. Specifically, it wasn't clear to me how to use manylinux2014 for publishing. I was trying something like this, but no luck:

docker run --rm -v $(pwd):/io konstin2/maturin publish -b cffi --no-sdist -r https://test.pypi.org/legacy/ -u USERNAME -p PASSWORD --skip-auditwheel --manylinux 2014

I think the problem was due to this:

Invalid value for project_urls. Error: Use both a label and an URL.

However, I never managed to upload anything, even after playing around with the project-url config in Cargo.toml (see e8c6171 for the config I used).

Any ideas?

nph4rd commented 3 years ago

Opened this issue, as I believe the problem is not due to the config.

nph4rd commented 3 years ago

Opened this issue, as I believe the problem is not due to the config.

Managed to publish with:

docker run --rm -v $(pwd):/io konstin2/maturin publish -b cffi --no-sdist -r https://test.pypi.org/legacy/ -u USERNAME -p PASSWORD --manylinux 2014

As was suggested here, we might want to use a GH Actions workflow to compile the wheel that we're interested in.

nph4rd commented 3 years ago

Update: Managed to build and publish package for aarch architecture as follows:

  1. Run docker container with:
    docker run --rm -it -v $(pwd):/home/rust/src messense/manylinux_2_24-cross:aarch64
  2. Downloaded Rust tools via Rustup:
    curl https://sh.rustup.rs -sSf | bash -s -- -y
  3. Configured shell:
    echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
    source $HOME/.cargo/env
  4. Added target:
    rustup target add aarch64-unknown-linux-gnu
  5. Publish package:
    maturin publish -b cffi --no-sdist -r https://test.pypi.org/legacy/ -u USER -p PASSWORD --manylinux 2014

I think we can just modify the docker image so as to run the last command in a GH Actions workflow. WDYT?