-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Haidong Yi
committed
Nov 18, 2024
1 parent
4486465
commit 2d1d2d0
Showing
4 changed files
with
109 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM mambaorg/micromamba:2-ubuntu22.04 AS source | ||
|
||
USER $MAMBA_USER | ||
|
||
# set work directory | ||
WORKDIR /tmp | ||
|
||
# copy environment file | ||
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml | ||
|
||
# create environment from yml file | ||
RUN micromamba env create -f environment.yml \ | ||
&& micromamba clean --all --yes \ | ||
&& rm /tmp/environment.yml | ||
|
||
FROM mambaorg/micromamba:2-ubuntu22.04 AS final | ||
|
||
ARG BUILD_VERSION=v0.1 | ||
|
||
################## METADATA ###################### | ||
LABEL base_image="micromamba:2-ubuntu22.04" | ||
LABEL version="1" | ||
LABEL software="scpy utilities" | ||
LABEL software.version="${BUILD_VERSION}" | ||
LABEL about.summary="Python data science utilities for single-cell omics data" | ||
LABEL about.tags="Genomics" | ||
LABEL about.license="MIT" | ||
|
||
COPY --from=source /opt/conda/envs/scpy /opt/conda/envs/scpy | ||
|
||
# Won't be activated unless you we login via /bin/bash command | ||
# RUN echo "micromamba activate fastcat" >> ~/.bashrc | ||
|
||
# set fastcat as the default environment | ||
# !!! this step is important or you cannot packages installed in this environment | ||
ENV ENV_NAME scpy | ||
ENV PATH=/opt/conda/envs/scpy/bin:$PATH | ||
|
||
WORKDIR /app | ||
|
||
# default command | ||
CMD ["python", "--help"] | ||
|
||
# add mantainer | ||
MAINTAINER Haidong Yi <[email protected]> |
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,46 @@ | ||
# Scpy Docker Image | ||
|
||
This Dockerfile builds a docker image (`scpy`) for python's data science utilities in single-cell data analysis. In this image, we bundled a few python packages: | ||
|
||
- numpy | ||
- pandas | ||
- scipy | ||
- polars | ||
- editdistance | ||
- umi_tools | ||
|
||
These python packages are useful in many applications of single-cell omics data analysis, especially for processing mapping and tagging results. | ||
|
||
## Build | ||
|
||
To build the image: | ||
|
||
```bash | ||
docker build -t scpy:v0.1 . | ||
``` | ||
|
||
You can specify a different version using the `BUILD_VERSION` argument: | ||
|
||
```bash | ||
docker build --build-arg BUILD_VERSION={your_version} -t scpy:{your_version} . | ||
``` | ||
|
||
## Usage | ||
|
||
Run the container: | ||
|
||
```bash | ||
docker run --rm scpy:v0.1 python --help | ||
``` | ||
|
||
This will display the help message for `Python`. To run specific commands, replace `python --help` with your desired commands that run python scripts. | ||
|
||
## Features | ||
|
||
- Created based on `micromamba` image | ||
- Bundled with useful python packages (e.g. `numpy`, `panads` and `polars` etc.) | ||
- For single-cell data analysis, we also added the python packages: `editdistance` and `umi_tools`. | ||
|
||
## License | ||
|
||
This docker image is released under the MIT License. |
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,17 @@ | ||
name: scpy | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- python ==3.8.19 | ||
- h5py ==3.11.0 | ||
- numpy ==1.23.5 | ||
- scipy ==1.10.1 | ||
- pandas ==2.0.3 | ||
- polars ==0.20.22 | ||
- editdistance ==0.6.2 | ||
- gcc | ||
- pip | ||
- pip: | ||
- umi_tools ==1.1.2 |
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 @@ | ||
v0.1 |