I’m using Docker container lsstsqre/centos:7-stack-lsst_distrib-v19_0_0 and git-lfs seems to be not properly set up in it. When I run the commend, it responds:
git: ‘lfs’ is not a git command. See ‘git --help’.
Did you mean this?
log
I’m currently figuring out how I can set up ‘git-lfs’ in the Docker environment. Do you have any idea about that? Thank you! - Duho
One option is to install git-lfs in a running container. As the container root:
yum install -y git-lfs
You would need to do this every time you start a container wherein you want to use git lfs.
If you want git-lfs available every time you start a container without needing an extra step, another option is to build a new Docker image over the lsstsqre/centos:7-stack-lsst_distrib-v19_0_0 image, with a Dockerfile something like this (untested!):
FROM lsstsqre/centos:7-stack-lsst_distrib-v19_0_0
USER root
RUN yum -y update && yum install -y git-lfs && yum clean all -y
USER lsst
and build with docker build -t duho/centos:7-stack-lsst_distrib-v19_0_0. Then run that image instead of lsstsqre/centos:7-stack-lsst_distrib-v19_0_0.
Another option is to install git-lfs on your machine’s native system, use it to get the files you need, and then map the relevant directory into your container when you run it:
docker run -ti -v /path/to/your/files:/home/lsst/files lsstsqre/centos:7-stack-lsst_distrib-v19_0_0.
For example, I have a bash alias that maps ~/LSST from my native system into the container’s ~/LSST: