You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using your seal-python wrapper successfully for my application in combination with https://github.com/s0l0ist/node-seal for my angular frontend. If i start everything locally on my windows machine both versions work together fine. But now I am trying to deploy my architecture into docker and therefor build your seal-wrapper for linux instead of the .pyd file. The problem is, that SEAL gives me the error RuntimeError: loaded SEALHeader is invalid now when i load a cipher (which got created in the frontend) into SEAL in python. Do you know why that could happen? Are there version differences between the linux and windows build?
cipher = Ciphertext()
# create temp file to load cipher text into seal
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
temp_file.write(cipher_bytes)
temp_file_path = temp_file.name
cipher.load(context, temp_file_path)
os.remove(temp_file_path)
return cipher
error gets thrown at cipher.load
Dockerfile:
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y \
git \
build-essential \
cmake \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/Huelse/SEAL-Python.git
WORKDIR /app/SEAL-Python
RUN pip install numpy pybind11
RUN git submodule update --init --recursive
RUN cd SEAL && \
cmake -S . -B build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF && \
cmake --build build && \
cd ..
RUN python3 setup.py build_ext -i
RUN cp seal.*.so /app/
WORKDIR /app
COPY . .
EXPOSE 5000
CMD ["python", "server.py"]
As i said locally everything works fine but dockerization creates that problem
The text was updated successfully, but these errors were encountered:
yes i know! So when i am running the python flask application on my windows pc locally i use the .pyd file and it works. But as soon i put the python flask application in a linux docker container (and therefor use the .so file as seen in the posted dockerfile) i get the error with the invalid seal header. If i run everything in docker except for the flask application locally on my pc (--> .pyd file) than it works too.
It seems like the compability problems are a result of the .so file usage in the docker container but i have to use it
I solved it - the problem was a result of the difference in the compression modes.
In your build specification you build the windows file without -DSEAL_USE_ZSTD=OFF but for linux it is stated.
I removed it for the linux build and now it works
I am using your seal-python wrapper successfully for my application in combination with https://github.com/s0l0ist/node-seal for my angular frontend. If i start everything locally on my windows machine both versions work together fine. But now I am trying to deploy my architecture into docker and therefor build your seal-wrapper for linux instead of the .pyd file. The problem is, that SEAL gives me the error RuntimeError: loaded SEALHeader is invalid now when i load a cipher (which got created in the frontend) into SEAL in python. Do you know why that could happen? Are there version differences between the linux and windows build?
error gets thrown at cipher.load
Dockerfile:
As i said locally everything works fine but dockerization creates that problem
The text was updated successfully, but these errors were encountered: