Skip to content

Commit da4f468

Browse files
authored
Merge pull request #301 from MannLabs/improve_readme
Improve readme and re-add Docker
2 parents 9fad486 + baaff89 commit da4f468

File tree

5 files changed

+293
-188
lines changed

5 files changed

+293
-188
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Build and publish Docker image
2+
name: Publish Docker image
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
tag_to_release:
8+
description: 'Enter tag to release (example: v1.5.5). A tag with this name must exist in the repository.'
9+
type: string
10+
required: true
11+
12+
jobs:
13+
publish_on_pypi:
14+
uses: MannLabs/alphashared/.github/workflows/publish_docker.yml@v1
15+
secrets:
16+
docker_access_token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
17+
docker_username: ${{ secrets.DOCKER_USERNAME }}
18+
with:
19+
package_name: alphatims
20+
tag_to_release: ${{ inputs.tag_to_release }}

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## Release History
2+
3+
For later release, see https://github.com/MannLabs/alphatims/releases
4+
5+
## 1.0.0
6+
7+
* FEAT: tempmmap for large arrays by default.
8+
9+
## 0.3.2
10+
11+
* FEAT: cli/gui allow bruker data as argument.
12+
* FEAT/FIX: Polarity included in frame table.
13+
* FIX: utils cleanup.
14+
* FIX: utils issues.
15+
* FEAT: by default use -1 threads in utils.
16+
* FIX: disable cla check.
17+
18+
## 0.3.1
19+
20+
* FIX/FEAT: Intensity correction when ICC is used. Note that this is only for exported data, not for visualized data.
21+
* FEAT: By default, hdf files are now mmapped, making them much faster to initially load and use virtual memory in favor of residual memory.
22+
23+
## 0.3.0
24+
25+
* FEAT: Introduction of global mz calibration.
26+
* FEAT: Introduction of dia_cycle for diaPASEF.
27+
* CHORE: Verified Python 3.9 compatibility.
28+
* FEAT: Included option to open Bruker raw data when starting the GUI.
29+
* FEAT: Provided hash for TimsTOF objects.
30+
* FEAT: Filter push indices.
31+
* CHORE: included stable and loose versions for all dependancies
32+
33+
## 0.2.8
34+
35+
* FIX: Ensure stable version for one click GUI.
36+
* FIX: Do not require plotting dependancies for CLI export csv selection.
37+
* FIX: Import of very old diaPASEF samples where the analysis.tdf file still looks like ddaPASEF.
38+
* FIX: frame pointers of fragment_frame table.
39+
* FEAT: Include visual report in performance notebook.
40+
* FEAT: Include DIA 120 sample in performance tests.
41+
* FEAT: Show performance in README.
42+
* FIX: Move python-lzf dependancy (to decompress older Bruker files) to legacy requirements, as pip install on Windows requires visual c++ otherwise.
43+
* DOCS: BioRxiv paper link.
44+
* FEAT/FIX: RT in min column.
45+
* FEAT: CLI manual.
46+
* FEAT: Inclusion of more coordinates in CLI.
47+
48+
## 0.2.7
49+
50+
* CHORE: Introduction of changelog.
51+
* CHORE: Automated publish_and_release action to parse version numbers.
52+
* FEAT/FIX: Include average precursor mz in MGF titles and set unknown precursor charges to 0.
53+
* FIX: Properly resolve set_global argument of `alphatims.utils.set_threads`.
54+
* FIX: Set nogil option for `alphatims.bruker.indptr_lookup`.
55+
* DOCS: GUI Manual typos.
56+
* FEAT: Include buttons to download test data and citation in GUI.
57+
* FEAT: Include option for progress_callback in alphatims.utils.pjit.
58+
* FIX/FEAT: Older samples with TimsCompressionType 1 can now also be read. This is at limited performance.
59+
* 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.

Dockerfile

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,54 @@
1+
# syntax=docker/dockerfile:1
12

2-
# FROM python:3.9-slim
3-
FROM --platform=linux/amd64 python:3.9-bullseye
3+
FROM --platform=linux/amd64 python:3.9-bookworm
44

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

7-
RUN adduser worker
8-
USER worker
9-
WORKDIR /home/worker
11+
WORKDIR /app
1012

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

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

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

22-
ENTRYPOINT [ "alphatims" ]
27+
RUN pip install --no-cache-dir -r requirements/requirements.txt
28+
RUN pip install --no-cache-dir -r requirements/requirements_plotting.txt
29+
30+
COPY alphatims alphatims
31+
COPY MANIFEST.in MANIFEST.in
32+
COPY LICENSE.txt LICENSE.txt
33+
COPY README.md README.md
34+
COPY pyproject.toml pyproject.toml
35+
36+
RUN pip install --no-cache-dir ".[stable,plotting-stable]"
37+
38+
RUN chmod 777 /usr/local/lib/python3.9/site-packages/alphatims/ext/timsdata.so
39+
RUN mkdir -p /usr/local/lib/python3.9/site-packages/alphatims/logs && chmod 777 /usr/local/lib/python3.9/site-packages/alphatims/logs
40+
41+
ENV PORT=5006
42+
EXPOSE 5006
43+
44+
# to allow other host ports than 5006
45+
ENV BOKEH_ALLOW_WS_ORIGIN=localhost
46+
47+
USER alphatimsuser
48+
49+
CMD ["/usr/local/bin/alphatims", "gui", "--port", "5006"]
50+
51+
# build & run:
52+
# docker build --progress=plain -t alphatims .
53+
# DATA_FOLDER=/path/to/local/data
54+
# docker run -p 5006:5006 -v $DATA_FOLDER:/app/data/ -t alphatims

0 commit comments

Comments
 (0)