-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
28 lines (19 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM condaforge/mambaforge
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /tmp
# Install ssh (missing dependency to run conda envs)
RUN apt-get update && \
apt-get install -y ssh build-essential libgl1-mesa-glx mesa-utils
# Upgrade mamba
RUN mamba upgrade -y mamba
# Copy environment and requirements files into docker env
COPY . ${WORKDIR}
# Update environment file with new environment name
RUN mamba env update --file environment.yml --name dockerenv
RUN echo "source activate dockerenv" > ~/.bashrc
# Fix issues with VMTK
RUN sed -i "s/file[[:space:]]=[[:space:]]open(self.OutputFileName,'r')/file = open(self.OutputFileName,'rb')/g" /opt/conda/envs/dockerenv/lib/python3.11/site-packages/vmtk/vmtkmeshwriter.py
RUN sed -i "s/gzfile[[:space:]]=[[:space:]]gzip.open(self.OutputFileName,'w')/gzfile = gzip.open(self.OutputFileName,'wb')/g" /opt/conda/envs/dockerenv/lib/python3.11/site-packages/vmtk/vmtkmeshwriter.py
RUN mamba run -n dockerenv python -m pip install .[test]
SHELL ["mamba", "run", "-n", "dockerenv", "/bin/bash", "-c"]
ENV MESA_LOADER_DRIVER_OVERRIDE=""