Skip to content

Commit 60ca580

Browse files
authored
fix: fix for redhat (#56)
1 parent 575fd45 commit 60ca580

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/microsim/cosem/_tstore.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
import concurrent.futures
22
import logging
3+
import os
34
import shutil
45
from collections.abc import Callable, Sequence
56
from itertools import product
67
from pathlib import Path
78
from typing import TYPE_CHECKING, Any, Literal, cast
89

910
import numpy as np
10-
import tensorstore as ts
1111
import tqdm
1212

1313
from ._client import COSEM_BUCKET, COSEM_CACHE
1414

15+
# https://github.com/google/tensorstore/issues/171
16+
RED_HAT_CA = "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
17+
if os.path.exists(RED_HAT_CA) and "TENSORSTORE_CA_BUNDLE" not in os.environ:
18+
os.environ["TENSORSTORE_CA_BUNDLE"] = RED_HAT_CA
19+
20+
import tensorstore as ts # noqa: E402
21+
1522
if TYPE_CHECKING:
1623
from .models import CosemImage
1724

0 commit comments

Comments
 (0)