Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Build and publish Docker image
name: Publish Docker image

on:
workflow_dispatch:
inputs:
tag_to_release:
description: 'Enter tag to release (example: v1.5.5). A tag with this name must exist in the repository.'
type: string
required: true

jobs:
publish_on_pypi:
uses: MannLabs/alphashared/.github/workflows/publish_docker.yml@v1
secrets:
docker_access_token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
with:
package_name: alphatims
tag_to_release: ${{ inputs.tag_to_release }}
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Release History

For later release, see https://github.com/MannLabs/alphatims/releases

## 1.0.0

* FEAT: tempmmap for large arrays by default.

## 0.3.2

* FEAT: cli/gui allow bruker data as argument.
* FEAT/FIX: Polarity included in frame table.
* FIX: utils cleanup.
* FIX: utils issues.
* FEAT: by default use -1 threads in utils.
* FIX: disable cla check.

## 0.3.1

* FIX/FEAT: Intensity correction when ICC is used. Note that this is only for exported data, not for visualized data.
* FEAT: By default, hdf files are now mmapped, making them much faster to initially load and use virtual memory in favor of residual memory.

## 0.3.0

* FEAT: Introduction of global mz calibration.
* FEAT: Introduction of dia_cycle for diaPASEF.
* CHORE: Verified Python 3.9 compatibility.
* FEAT: Included option to open Bruker raw data when starting the GUI.
* FEAT: Provided hash for TimsTOF objects.
* FEAT: Filter push indices.
* CHORE: included stable and loose versions for all dependancies

## 0.2.8

* FIX: Ensure stable version for one click GUI.
* FIX: Do not require plotting dependancies for CLI export csv selection.
* FIX: Import of very old diaPASEF samples where the analysis.tdf file still looks like ddaPASEF.
* FIX: frame pointers of fragment_frame table.
* FEAT: Include visual report in performance notebook.
* FEAT: Include DIA 120 sample in performance tests.
* FEAT: Show performance in README.
* FIX: Move python-lzf dependancy (to decompress older Bruker files) to legacy requirements, as pip install on Windows requires visual c++ otherwise.
* DOCS: BioRxiv paper link.
* FEAT/FIX: RT in min column.
* FEAT: CLI manual.
* FEAT: Inclusion of more coordinates in CLI.

## 0.2.7

* CHORE: Introduction of changelog.
* CHORE: Automated publish_and_release action to parse version numbers.
* FEAT/FIX: Include average precursor mz in MGF titles and set unknown precursor charges to 0.
* FIX: Properly resolve set_global argument of `alphatims.utils.set_threads`.
* FIX: Set nogil option for `alphatims.bruker.indptr_lookup`.
* DOCS: GUI Manual typos.
* FEAT: Include buttons to download test data and citation in GUI.
* FEAT: Include option for progress_callback in alphatims.utils.pjit.
* FIX/FEAT: Older samples with TimsCompressionType 1 can now also be read. This is at limited performance.
* FEAT: By default use loose versioning for the base dependancies. Stable dependancy versions can be enforced with `pip install "alphatims[stable]"`. NOTE: This option is not guaranteed to be maintained. Future AlphaTims versions might opt for an intermediate solution with semi-strict dependancy versioning.
62 changes: 47 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
# syntax=docker/dockerfile:1

# FROM python:3.9-slim
FROM --platform=linux/amd64 python:3.9-bullseye
FROM --platform=linux/amd64 python:3.9-bookworm

RUN apt-get update && apt-get install -y build-essential gcc python3-dev
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1

RUN adduser worker
USER worker
WORKDIR /home/worker
WORKDIR /app

COPY --chown=worker:worker dist/*.whl /home/worker

# RUN python3 -m pip install ".[plotting-stable]" # Image is 1.6gb with plotting
# The size is reduced to 847 mb without it.
RUN python3 -m pip install --disable-pip-version-check --no-cache-dir --user /home/worker/*.whl
RUN ls /home/worker/.local/lib/python3.9/site-packages/alphatims/ext/timsdata.so
RUN chmod 777 /home/worker/.local/lib/python3.9/site-packages/alphatims/ext/timsdata.so
# Create a non-privileged user that the app will run under.
# See https://docs.docker.com/go/dockerfile-user-best-practices/
ARG UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/home/alphatimsuser" \
--shell "/sbin/nologin" \
--uid "${UID}" \
alphatimsuser

RUN python3 -m pip cache purge
ENV PATH="/home/worker/.local/bin:${PATH}"
COPY requirements requirements

ENTRYPOINT [ "alphatims" ]
RUN pip install --no-cache-dir -r requirements/requirements.txt
RUN pip install --no-cache-dir -r requirements/requirements_plotting.txt

COPY alphatims alphatims
COPY MANIFEST.in MANIFEST.in
COPY LICENSE.txt LICENSE.txt
COPY README.md README.md
COPY pyproject.toml pyproject.toml

RUN pip install --no-cache-dir ".[stable,plotting-stable]"

RUN chmod 777 /usr/local/lib/python3.9/site-packages/alphatims/ext/timsdata.so
RUN mkdir -p /usr/local/lib/python3.9/site-packages/alphatims/logs && chmod 777 /usr/local/lib/python3.9/site-packages/alphatims/logs

ENV PORT=5006
EXPOSE 5006

# to allow other host ports than 5006
ENV BOKEH_ALLOW_WS_ORIGIN=localhost

USER alphatimsuser

CMD ["/usr/local/bin/alphatims", "gui", "--port", "5006"]

# build & run:
# docker build --progress=plain -t alphatims .
# DATA_FOLDER=/path/to/local/data
# docker run -p 5006:5006 -v $DATA_FOLDER:/app/data/ -t alphatims
Loading
Loading