Comments (3)
Hi Alena,
Thank you so much. indeed it works like a charm.
I changed it a bit to clean up after the installation. I share it here in case someone is interested.
Base image
FROM python:3.10-alpine
RUN apk -U upgrade --no-cache
&& apk add --no-cache git make cmake g++
&& pip install --upgrade pip
Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
#mpark variant
WORKDIR /tmp
RUN git clone https://github.com/mpark/variant.git
WORKDIR /tmp/variant/build
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
&& make -j4
&& make install
#fmt
WORKDIR /tmp
RUN git clone https://github.com/fmtlib/fmt.git
WORKDIR /tmp/fmt/build
RUN git checkout 7.1.3
&& cmake -DFMT_TEST=OFF -DFMT_DOC=OFF ..
&& make -j4
&& make install
#lfp
WORKDIR /tmp
RUN git clone https://github.com/equinor/layered-file-protocols.git
WORKDIR /tmp/layered-file-protocols/build
RUN cmake -DBUILD_SHARED_LIBS=ON -DLFP_FMT_HEADER_ONLY=ON -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
&& make -j4
&& make install
#dlisio
WORKDIR /tmp
RUN git clone https://github.com/equinor/dlisio.git
WORKDIR /tmp/dlisio
RUN git checkout v1.0.0
&& pip install -r python/requirements-dev.txt
WORKDIR /tmp/dlisio/build
RUN cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib ..
&& make -j4
&& make install
Remove unwanted files and folders created during the last 4 layers in /tmp
WORKDIR /tmp
RUN rm -rf *
Remove unwanted packages after building dlisio from source
RUN apk del git make cmake
from dlisio.
Hi!
Thank you for the report.
Unfortunately dlisio doesn't build musllinux wheels, so you get this error on alpine.
We will see if we can make them available through pip in the next release.
For now you can either use a non-alpine base image for your build, or you can build dlisio yourself. Looks like it works fine.
FROM python:3.10-alpine
RUN apk update
RUN apk upgrade --no-cache
RUN apk add --no-cache git make cmake g++ python3 py3-pip py3-virtualenv
#mpark variant
WORKDIR /home/ci
RUN git clone https://github.com/mpark/variant.git
WORKDIR /home/ci/variant/build
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
RUN make -j4
RUN make install
#fmt
WORKDIR /home/ci
RUN git clone https://github.com/fmtlib/fmt.git
WORKDIR /home/ci/fmt/build
RUN git checkout 7.1.3
RUN cmake -DFMT_TEST=OFF -DFMT_DOC=OFF ..
RUN make -j4
RUN make install
#lfp
WORKDIR /home/ci
RUN git clone https://github.com/equinor/layered-file-protocols.git
WORKDIR /home/ci/layered-file-protocols/build
RUN cmake -DBUILD_SHARED_LIBS=ON -DLFP_FMT_HEADER_ONLY=ON -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
RUN make -j4
RUN make install
#dlisio
WORKDIR /home/ci
RUN git clone https://github.com/equinor/dlisio.git
WORKDIR /home/ci/dlisio
RUN git checkout v1.0.0
RUN python3 -m venv venv
RUN . venv/bin/activate
RUN /home/ci/dlisio/venv/bin/python -m pip install --upgrade pip
RUN /home/ci/dlisio/venv/bin/python -m pip install -r python/requirements-dev.txt
WORKDIR /home/ci/dlisio/build
RUN cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_NAME_DIR=/usr/local/lib -DPYTHON_EXECUTABLE="/home/ci/dlisio/venv/bin/python" ..
RUN make -j4
RUN ctest --verbose
RUN make install
RUN "/home/ci/dlisio/venv/bin/python" -c "import dlisio; print(dlisio.__version__)"
from dlisio.
FYI: for version 1.0.1 musllinux x86_64 wheels are supplied through pip, so there should be no need anymore to build from source for docker on standard architecture.
from dlisio.
Related Issues (20)
- How to extract 'Sequence' and 'Producer code' details from an LIS file? HOT 1
- Rename Datasets HOT 1
- Missing "index_mnem" in the Data Format Specification Record (DFSR) HOT 5
- logical_file.data_format_specs() throwing AttributeError 'dlisio.core.lis_stream' object has no attribute 'read_records' HOT 8
- How to extract dlisio.lis.InformationRecord HOT 1
- One channel name is missing while extracting channels from logical_file HOT 5
- Extracting metadata (parameter) information from LIS files. HOT 7
- Error while extracting curves, "Data must be 1-dimensional" HOT 6
- Building Dlisio on a Macbook M1 HOT 1
- pip install dlisio error HOT 1
- Incorrect format version in Visible Record HOT 2
- How to access header information in unstructured LIS files? HOT 2
- Version 0.3.6 will not build on Alpine 3.16/gcc 11.2.1 HOT 4
- Is there a way to write? HOT 2
- Feature request: DLISIO support reading from byte buffers
- Issue with installing from pip om M1 Mac HOT 5
- Accessing First & Last Reading of a Tool/Curves HOT 2
- fshort data type help HOT 2
- DeprecationWarning: pkg_resources is deprecated as an API. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlisio.