Skip to content

Commit

Permalink
Fix SSL Error (#4825)
Browse files Browse the repository at this point in the history
Addresses errors in `wheel-tests` seen
[here](#4818)

Installs SSL certificates with `certifi` as outlined in this issue
[here](rapidsai/build-infra#56)
  • Loading branch information
nv-rliu authored Dec 11, 2024
1 parent 58075dd commit 2d32c86
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 11 deletions.
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 @@ -10,6 +10,7 @@ dependencies:
- aiohttp
- breathe
- c-compiler
- certifi
- cmake>=3.26.4,!=3.30.0
- cuda-nvtx
- 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 @@ -10,6 +10,7 @@ dependencies:
- aiohttp
- breathe
- c-compiler
- certifi
- cmake>=3.26.4,!=3.30.0
- cuda-cudart-dev
- cuda-nvcc
Expand Down
2 changes: 2 additions & 0 deletions dependencies.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ dependencies:
common:
- output_types: [conda, requirements]
packages:
- certifi
- ipython
- notebook>=0.5.0
- output_types: [conda]
Expand All @@ -489,6 +490,7 @@ dependencies:
common:
- output_types: [conda, pyproject]
packages:
- certifi
- networkx>=2.5.1
- *numpy
- python-louvain
Expand Down
1 change: 1 addition & 0 deletions python/cugraph-service/server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ cugraph-service-server = "cugraph_service_server.__main__:main"

[project.optional-dependencies]
test = [
"certifi",
"networkx>=2.5.1",
"numpy>=1.23,<3.0a0",
"pandas",
Expand Down
15 changes: 8 additions & 7 deletions python/cugraph/cugraph/datasets/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import cudf
import dask_cudf
import yaml
import os
import pandas as pd
import cugraph.dask as dcg
import yaml
from pathlib import Path
import urllib.request
from urllib.request import urlretrieve

import cudf
import cugraph.dask as dcg
import dask_cudf
from cugraph.structure.graph_classes import Graph


Expand Down Expand Up @@ -142,7 +143,7 @@ def __download_csv(self, url):
filename = self.metadata["name"] + self.metadata["file_type"]
if self._dl_path.path.is_dir():
self._path = self._dl_path.path / filename
urllib.request.urlretrieve(url, str(self._path))
urlretrieve(url, str(self._path))

else:
raise RuntimeError(
Expand Down Expand Up @@ -458,7 +459,7 @@ def download_all(force=False):
filename = meta["name"] + meta["file_type"]
save_to = default_download_dir.path / filename
if not save_to.is_file() or force:
urllib.request.urlretrieve(meta["url"], str(save_to))
urlretrieve(meta["url"], str(save_to))


def set_download_dir(path):
Expand Down
3 changes: 0 additions & 3 deletions python/cugraph/cugraph/testing/resultset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import warnings
import tarfile

import urllib.request

import cudf
Expand All @@ -22,8 +21,6 @@
default_download_dir,
)

# results_dir_path = utils.RAPIDS_DATASET_ROOT_DIR_PATH / "tests" / "resultsets"


class Resultset:
"""
Expand Down
13 changes: 12 additions & 1 deletion python/cugraph/cugraph/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,20 @@
# Avoid timeout during shutdown
from dask_cuda.utils_test import IncreasedCloseTimeoutNanny

# module-wide fixtures
import certifi
from ssl import create_default_context
from urllib.request import build_opener, HTTPSHandler, install_opener


# 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))


# module-wide fixtures

# Spoof the gpubenchmark fixture if it's not available so that asvdb and
# rapids-pytest-benchmark do not need to be installed to run tests.
if "gpubenchmark" not in globals():
Expand Down
1 change: 1 addition & 0 deletions python/cugraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ classifiers = [

[project.optional-dependencies]
test = [
"certifi",
"networkx>=2.5.1",
"numpy>=1.23,<3.0a0",
"pandas",
Expand Down

0 comments on commit 2d32c86

Please sign in to comment.