我正在尝试通过我的 docker 容器连接到我公司的 Oracle 数据库,该容器包含我的一些带有 cx_Oracle 包的 python 脚本。构建并运行容器后,出现以下错误:
conn = cx_Oracle.connect("{0}/{1}@{2}".format(configOracle["username"], configOracle["password"],r"ed03:1521/configOracle["servername"]))
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help
Run Code Online (Sandbox Code Playgroud)
我有一个 Oracle 配置文件,其中的用户名、密码和服务器名称来自并正确填写。即使从https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html下载了最新的客户端,我似乎也无法让它工作。
我的目录结构如下所示:
--TopDirectory
----instantclient
-------instantclient-basic-linux.x64-19.5.0.0.0dbru.zip
-------instantclient-sdk-linux.x64-19.5.0.0.0dbru.zip
----hello_oracle.py
----Dockerfile
----requirements.txt
----configOracle.json
Run Code Online (Sandbox Code Playgroud)
这是我的 Dockerfile:
FROM python:3.7.5
#Oracle Client setup
ENV ORACLE_HOME /opt/oracle/instantclient_19_5
ENV LD_RUN_PATH=$ORACLE_HOME
COPY instantclient/* /tmp/
RUN \
mkdir -p /opt/oracle && \
unzip "/tmp/instantclient*.zip" -d /opt/oracle && \ …Run Code Online (Sandbox Code Playgroud) 任何人都知道为什么我在 Jupyter Notebooks 中遇到这个错误???我一直在尝试将我的 Tensorflow 模型加载到 Apache Spark vis SparlFlow 但我似乎无法弄清楚如何克服这个错误。任何帮助将非常感激。
第一个 Jupyter 单元格:
from sparkflow.graph_utils import build_graph
from sparkflow.tensorflow_async import SparkAsyncDL
import tensorflow as tf
from pyspark.ml.feature import VectorAssembler, OneHotEncoder
from pyspark.ml.pipeline import Pipeline
from pyspark.sql import SparkSession
from tensorflow.keras import layers
from tensorflow.keras import losses
Run Code Online (Sandbox Code Playgroud)
第二个 Jupyter 单元格:
def lstm_model(X_train, y_train):
# Reshapes to input neuron
inputs= keras.Input(shape = (X_train.shape[1], 1))\
#Training Layers
x_1 = layers.LSTM(units=50, return_sequences=True, input_shape=(X_train.shape[1], 1))(inputs)
x_1 = layers.Dropout(0.2)(x_1)
x_1 = layers.LSTM(units = 50, return_sequences …Run Code Online (Sandbox Code Playgroud) python ×2
apache-spark ×1
containers ×1
css ×1
docker ×1
dockerfile ×1
frontend ×1
javascript ×1
oracle ×1
pyspark ×1
reactjs ×1
tensorflow ×1