generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #548 from MannLabs/develop
Develop 0.5.0
- Loading branch information
Showing
80 changed files
with
3,027 additions
and
1,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,3 +149,6 @@ checklink/cookies.txt | |
logs | ||
_docs/ | ||
sidebar.yml | ||
|
||
_proc/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM jupyter/base-notebook:python-3.8 | ||
|
||
USER root | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
build-essential \ | ||
libgomp1 \ | ||
gnupg \ | ||
ca-certificates \ | ||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
&& echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list \ | ||
&& apt update \ | ||
&& apt install -y mono-devel \ | ||
&& wget https://github.com/MannLabs/alphapept/blob/master/alphapept/ext/bruker/FF/linux64/libtbb.so.2 \ | ||
&& mv libtbb.so.2 /usr/lib/ | ||
|
||
RUN conda install -c anaconda pytables==3.6.1 | ||
RUN conda install -c conda-forge pythonnet | ||
RUN conda install numba==0.55.2 numpy==1.20.3 pandas==1.4.3 | ||
|
||
COPY . . | ||
RUN pip install ".[stable,gui-stable]" | ||
|
||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && apt-get install build-essential -y | ||
RUN apt-get install python3-pip -y | ||
RUN apt-get install python3-pip procps -y | ||
|
||
WORKDIR /home/alphapept/ | ||
COPY . . | ||
|
||
RUN pip install . | ||
RUN pip install "alphapept[stable,gui-stable]" | ||
|
||
RUN apt-get install libgomp1 -y | ||
RUN cp /usr/local/lib/python3.8/dist-packages/alphapept/ext/bruker/FF/linux64/libtbb.so.2 /usr/lib/libtbb.so.2 | ||
|
||
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.8/dist-packages/alphapept/ext/bruker/FF/linux64/ | ||
RUN chmod 555 -R /usr/local/lib/python3.8/dist-packages/alphapept/ext/bruker/FF/linux64/uff-cmdline2 | ||
|
||
RUN pip install "numpy<1.24.0" | ||
RUN pip install "sqlalchemy<2.0" | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
FROM python:3.8.3 | ||
FROM jupyter/base-notebook:python-3.8 | ||
|
||
# Mono: 5.20 | ||
USER root | ||
|
||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
&& echo "deb http://download.mono-project.com/repo/debian stretch/snapshots/5.20 main" > /etc/apt/sources.list.d/mono-official.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y clang \ | ||
&& apt-get install -y mono-devel=5.20\* \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
build-essential \ | ||
libgomp1 \ | ||
gnupg \ | ||
ca-certificates \ | ||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
&& echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list \ | ||
&& apt update \ | ||
&& apt install -y mono-devel \ | ||
&& wget https://github.com/MannLabs/alphapept/blob/master/alphapept/ext/bruker/FF/linux64/libtbb.so.2 \ | ||
&& mv libtbb.so.2 /usr/lib/ | ||
|
||
# Pythonnet: 2.5.0 (from PyPI) | ||
# Note: pycparser must be installed before pythonnet can be built | ||
RUN conda install -c anaconda pytables==3.6.1 | ||
RUN conda install -c conda-forge pythonnet>=2.5.0 | ||
RUN conda install numba==0.55.2 numpy==1.20.3 pandas==1.4.3 | ||
|
||
RUN pip install pycparser \ | ||
&& pip install pythonnet==2.5.0 | ||
RUN pip install "alphapept[stable,gui-stable]" | ||
|
||
WORKDIR /home/alphapept/ | ||
COPY . . | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pip install . | ||
|
||
CMD ["bash"] | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
__version__ = "0.4.9" | ||
__version__ = "0.5.0" | ||
|
||
__requirements__ = { | ||
"": "requirements/requirements.txt", | ||
"develop": "requirements/requirements_develop.txt", | ||
"gui": "requirements/requirements_gui.txt", | ||
"legacy": "requirements/requirements_legacy.txt", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import clr | ||
import os | ||
import numpy as np | ||
|
||
clr.AddReference('System') | ||
# from System.Runtime.InteropServices import Marshal | ||
# from System import IntPtr, Int64 | ||
# def DotNetArrayToNPArray(src): | ||
# ''' | ||
# See https://github.com/mobiusklein/ms_deisotope/blob/90b817d4b5ae7823cfe4ad61c57119d62a6e3d9d/ms_deisotope/data_source/thermo_raw_net.py#L217 | ||
# ''' | ||
# if src is None: | ||
# return np.array([], dtype=np.float64) | ||
# dest = np.empty(len(src), dtype=np.float64) | ||
# Marshal.Copy( | ||
# src, 0, | ||
# IntPtr.__overloads__[Int64](dest.__array_interface__['data'][0]), | ||
# len(src)) | ||
# return dest | ||
|
||
from System.Runtime.InteropServices import GCHandle, GCHandleType | ||
import ctypes | ||
def DotNetArrayToNPArray(src): | ||
''' | ||
See https://mail.python.org/pipermail/pythondotnet/2014-May/001527.html | ||
''' | ||
if src is None: | ||
return np.array([], dtype=np.float64) | ||
src_hndl = GCHandle.Alloc(src, GCHandleType.Pinned) | ||
try: | ||
src_ptr = src_hndl.AddrOfPinnedObject().ToInt64() | ||
bufType = ctypes.c_double*len(src) | ||
cbuf = bufType.from_address(src_ptr) | ||
dest = np.frombuffer(cbuf, dtype=cbuf._type_).copy() | ||
finally: | ||
if src_hndl.IsAllocated: src_hndl.Free() | ||
return dest | ||
|
||
ext_dir = os.path.join( | ||
os.path.dirname(__file__), | ||
'ext' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.