chore(release): build openssl statically in manylinux2014 build (#1115)

* chore(release): build libssl statically in manylinux2014 build

* fix: add openssl to cargo-machete ignore
This commit is contained in:
Meng Zhang 2023-12-26 13:01:47 +08:00 committed by GitHub
parent 7876f57da8
commit bf5b6cfe2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 3 deletions

View File

@ -35,16 +35,17 @@ jobs:
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014
container: quay.io/pypa/manylinux2014_x86_64
build_args: --features static-ssl
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-cuda117
container: sameli/manylinux2014_x86_64_cuda_11.7
build_args: --features cuda
build_args: --features static-ssl --features cuda
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-cuda122
container: sameli/manylinux2014_x86_64_cuda_12.2
build_args: --features cuda
build_args: --features static-ssl --features cuda
- os: windows-latest
target: x86_64-pc-windows-msvc
binary: x86_64-windows-msvc
@ -65,7 +66,7 @@ jobs:
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-rocm57
container: ghcr.io/cromefire/hipblas-manylinux/2014/5.7:latest
build_args: --features rocm
build_args: --features static-ssl --features rocm
env:
SCCACHE_GHA_ENABLED: true

11
Cargo.lock generated
View File

@ -2382,6 +2382,15 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-src"
version = "300.2.1+3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3"
dependencies = [
"cc",
]
[[package]]
name = "openssl-sys"
version = "0.9.97"
@ -2390,6 +2399,7 @@ checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b"
dependencies = [
"cc",
"libc",
"openssl-src",
"pkg-config",
"vcpkg",
]
@ -3673,6 +3683,7 @@ dependencies = [
"llama-cpp-bindings",
"minijinja",
"nvml-wrapper",
"openssl",
"opentelemetry",
"opentelemetry-otlp",
"regex",

View File

@ -9,6 +9,10 @@ ee = ["dep:tabby-webserver"]
cuda = ["llama-cpp-bindings/cuda"]
rocm = ["llama-cpp-bindings/rocm"]
experimental-http = ["dep:http-api-bindings"]
# If compiling on a system without OpenSSL installed, or cross-compiling for a different
# architecture, enable this feature to compile OpenSSL as part of the build.
# See https://docs.rs/openssl/#vendored for more.
static-ssl = ['openssl/vendored']
[dependencies]
tabby-common = { path = "../tabby-common" }
@ -52,6 +56,10 @@ thiserror.workspace = true
chrono = "0.4.31"
axum-prometheus = "0.4.0"
[dependencies.openssl]
optional = true
version = "*"
[dependencies.uuid]
version = "1.3.3"
features = [
@ -68,3 +76,6 @@ assert-json-diff = "2.0.2"
insta = { version = "1.34.0", features = ["yaml", "redactions"] }
reqwest.workspace = true
serde-jsonlines = "0.5.0"
[package.metadata.cargo-machete]
ignored = ["openssl"]