-
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
1 parent
b2e712b
commit 9193848
Showing
2 changed files
with
51 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,19 @@ | ||
FROM mambaorg/micromamba:latest | ||
|
||
USER root | ||
|
||
WORKDIR /lidro | ||
|
||
# # Set up the Conda environment: cf https://github.com/mamba-org/micromamba-docker | ||
COPY environment.yml /tmp/env.yaml | ||
COPY requirements.txt /tmp/requirements.txt | ||
RUN chown $MAMBA_USER:$MAMBA_USER /tmp/env.yaml | ||
RUN micromamba install -y -n base -f /tmp/env.yaml && \ | ||
micromamba clean --all --yes | ||
|
||
ENV ENV=base | ||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
|
||
|
||
COPY lidro lidro | ||
COPY configs configs |
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,32 @@ | ||
# Makefile to manage main tasks | ||
# cf. https://blog.ianpreston.ca/conda/python/bash/2020/05/13/conda_envs.html#makefile | ||
|
||
# Oneshell means I can run multiple lines in a recipe in the same shell, so I don't have to | ||
# chain commands together with semicolon | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
install: | ||
pip install -e . | ||
|
||
install-precommit: | ||
pre-commit install | ||
|
||
mamba-env-create: | ||
mamba env create -n lidro -f environment.yml | ||
|
||
mamba-env-update: | ||
mamba env update -n lidro -f environment.yml | ||
|
||
############################## | ||
# Docker | ||
############################## | ||
|
||
PROJECT_NAME=lidar_hd/lidro | ||
VERSION=`python -m lidro._version` | ||
|
||
docker-build: | ||
docker build -t ${PROJECT_NAME}:${VERSION} -f Dockerfile . | ||
|
||
docker-remove: | ||
docker rmi -f `docker images | grep ${PROJECT_NAME} | tr -s ' ' | cut -d ' ' -f 3` | ||
docker rmi -f `docker images -f "dangling=true" -q` |