Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSL error. #6177

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ channels:
- nvidia
dependencies:
- c-compiler
- certifi
- cmake>=3.26.4,!=3.30.0
- cuda-python>=11.7.1,<12.0a0,<=11.8.3
- cuda-version=11.8
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ channels:
- nvidia
dependencies:
- c-compiler
- certifi
- cmake>=3.26.4,!=3.30.0
- cuda-cudart-dev
- cuda-nvcc
Expand Down
1 change: 1 addition & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- certifi
- *cython
- dask-ml
- hdbscan>=0.8.39,<0.8.40
Expand Down
11 changes: 11 additions & 0 deletions python/cuml/cuml/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from sklearn.utils import Bunch
from datetime import timedelta
from math import ceil
from ssl import create_default_context
from urllib.request import build_opener, HTTPSHandler, install_opener
import certifi
import hypothesis
from cuml.internals.safe_imports import gpu_only_import
import pytest
Expand All @@ -41,6 +44,14 @@
# Add the import here for any plugins that should be loaded EVERY TIME
pytest_plugins = "cuml.testing.plugins.quick_run_plugin"


# Install SSL certificates
def pytest_sessionstart(session):
ssl_context = create_default_context(cafile=certifi.where())
https_handler = HTTPSHandler(context=ssl_context)
install_opener(build_opener(https_handler))


CI = os.environ.get("CI") in ("true", "1")
HYPOTHESIS_ENABLED = os.environ.get("HYPOTHESIS_ENABLED") in (
"true",
Expand Down
10 changes: 10 additions & 0 deletions python/cuml/cuml/tests/dask/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.

import certifi
import pytest
from ssl import create_default_context
from urllib.request import build_opener, HTTPSHandler, install_opener

from dask_cuda import initialize
from dask_cuda import LocalCUDACluster
Expand All @@ -12,6 +15,13 @@
enable_infiniband = False


# Install SSL certificates
def pytest_sessionstart(session):
ssl_context = create_default_context(cafile=certifi.where())
https_handler = HTTPSHandler(context=ssl_context)
install_opener(build_opener(https_handler))


@pytest.fixture(scope="module")
def cluster():

Expand Down
1 change: 1 addition & 0 deletions python/cuml/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ classifiers = [

[project.optional-dependencies]
test = [
"certifi",
"cython>=3.0.0",
"dask-ml",
"hdbscan>=0.8.39,<0.8.40",
Expand Down
Loading