|
| 1 | +# Generated by Neurodocker and Reproenv. |
| 2 | + |
| 3 | +FROM ubuntu:20.04 |
| 4 | +ENV LANG="en_US.UTF-8" \ |
| 5 | + LC_ALL="en_US.UTF-8" \ |
| 6 | + ND_ENTRYPOINT="/neurodocker/startup.sh" |
| 7 | +RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \ |
| 8 | + && apt-get update -qq \ |
| 9 | + && apt-get install -y -q --no-install-recommends \ |
| 10 | + apt-utils \ |
| 11 | + bzip2 \ |
| 12 | + ca-certificates \ |
| 13 | + curl \ |
| 14 | + locales \ |
| 15 | + unzip \ |
| 16 | + && rm -rf /var/lib/apt/lists/* \ |
| 17 | + && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ |
| 18 | + && dpkg-reconfigure --frontend=noninteractive locales \ |
| 19 | + && update-locale LANG="en_US.UTF-8" \ |
| 20 | + && chmod 777 /opt && chmod a+s /opt \ |
| 21 | + && mkdir -p /neurodocker \ |
| 22 | + && if [ ! -f "$ND_ENTRYPOINT" ]; then \ |
| 23 | + echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \ |
| 24 | + && echo 'set -e' >> "$ND_ENTRYPOINT" \ |
| 25 | + && echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \ |
| 26 | + && echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \ |
| 27 | + fi \ |
| 28 | + && chmod -R 777 /neurodocker && chmod a+s /neurodocker |
| 29 | +ENV DEBIAN_FRONTEND="noninteractive" |
| 30 | +RUN chmod 777 /tmp |
| 31 | +RUN apt-get update -qq \ |
| 32 | + && apt-get install -y -q --no-install-recommends \ |
| 33 | + build-essential \ |
| 34 | + ca-certificates \ |
| 35 | + git \ |
| 36 | + netbase \ |
| 37 | + && rm -rf /var/lib/apt/lists/* |
| 38 | +ENV CONDA_DIR="/opt/miniconda-py311_24.4.0-0" \ |
| 39 | + PATH="/opt/miniconda-py311_24.4.0-0/bin:$PATH" |
| 40 | +RUN apt-get update -qq \ |
| 41 | + && apt-get install -y -q --no-install-recommends \ |
| 42 | + bzip2 \ |
| 43 | + ca-certificates \ |
| 44 | + curl \ |
| 45 | + && rm -rf /var/lib/apt/lists/* \ |
| 46 | + # Install dependencies. |
| 47 | + && export PATH="/opt/miniconda-py311_24.4.0-0/bin:$PATH" \ |
| 48 | + && echo "Downloading Miniconda installer ..." \ |
| 49 | + && conda_installer="/tmp/miniconda.sh" \ |
| 50 | + && curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-py311_24.4.0-0-Linux-x86_64.sh \ |
| 51 | + && bash "$conda_installer" -b -p /opt/miniconda-py311_24.4.0-0 \ |
| 52 | + && rm -f "$conda_installer" \ |
| 53 | + # Prefer packages in conda-forge |
| 54 | + && conda config --system --prepend channels conda-forge \ |
| 55 | + # Packages in lower-priority channels not considered if a package with the same |
| 56 | + # name exists in a higher priority channel. Can dramatically speed up installations. |
| 57 | + # Conda recommends this as a default |
| 58 | + # https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html |
| 59 | + && conda config --set channel_priority strict \ |
| 60 | + && conda config --system --set auto_update_conda false \ |
| 61 | + && conda config --system --set show_channel_urls true \ |
| 62 | + # Enable `conda activate` |
| 63 | + && conda init bash \ |
| 64 | + && conda install -y --name base \ |
| 65 | + "gxx_linux-64" \ |
| 66 | + "notebook" \ |
| 67 | + "jupyterlab" \ |
| 68 | + "numpy" \ |
| 69 | + "git-annex" \ |
| 70 | + "ipywidgets" \ |
| 71 | + # Clean up |
| 72 | + && sync && conda clean --all --yes && sync \ |
| 73 | + && rm -rf ~/.cache/pip/* |
| 74 | +RUN chmod 777 /opt/miniconda-py311_24.4.0-0/share |
| 75 | +RUN python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu |
| 76 | +RUN test "$(getent passwd voxelwise)" \ |
| 77 | + || useradd --no-user-group --create-home --shell /bin/bash voxelwise |
| 78 | +USER voxelwise |
| 79 | +WORKDIR /home/voxelwise |
| 80 | +RUN git clone https://github.com/gallantlab/voxelwise_tutorials.git --depth 1 |
| 81 | +RUN python -m pip install voxelwise_tutorials |
| 82 | +RUN git config --global user.email '[email protected]' |
| 83 | +RUN git config --global user.name 'Your Name' |
| 84 | +WORKDIR /home/voxelwise/voxelwise_tutorials/tutorials/notebooks/shortclips |
| 85 | +ENTRYPOINT ["/neurodocker/startup.sh"] |
| 86 | + |
| 87 | +# Save specification to JSON. |
| 88 | +USER root |
| 89 | +RUN printf '{ \ |
| 90 | + "pkg_manager": "apt", \ |
| 91 | + "existing_users": [ \ |
| 92 | + "root" \ |
| 93 | + ], \ |
| 94 | + "instructions": [ \ |
| 95 | + { \ |
| 96 | + "name": "from_", \ |
| 97 | + "kwds": { \ |
| 98 | + "base_image": "ubuntu:20.04" \ |
| 99 | + } \ |
| 100 | + }, \ |
| 101 | + { \ |
| 102 | + "name": "env", \ |
| 103 | + "kwds": { \ |
| 104 | + "LANG": "en_US.UTF-8", \ |
| 105 | + "LC_ALL": "en_US.UTF-8", \ |
| 106 | + "ND_ENTRYPOINT": "/neurodocker/startup.sh" \ |
| 107 | + } \ |
| 108 | + }, \ |
| 109 | + { \ |
| 110 | + "name": "run", \ |
| 111 | + "kwds": { \ |
| 112 | + "command": "export ND_ENTRYPOINT=\\"/neurodocker/startup.sh\\"\\napt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n apt-utils \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl \\\\\\n locales \\\\\\n unzip\\nrm -rf /var/lib/apt/lists/*\\nsed -i -e '"'"'s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/'"'"' /etc/locale.gen\\ndpkg-reconfigure --frontend=noninteractive locales\\nupdate-locale LANG=\\"en_US.UTF-8\\"\\nchmod 777 /opt && chmod a+s /opt\\nmkdir -p /neurodocker\\nif [ ! -f \\"$ND_ENTRYPOINT\\" ]; then\\n echo '"'"'#!/usr/bin/env bash'"'"' >> \\"$ND_ENTRYPOINT\\"\\n echo '"'"'set -e'"'"' >> \\"$ND_ENTRYPOINT\\"\\n echo '"'"'export USER=\\"${USER:=`whoami`}\\"'"'"' >> \\"$ND_ENTRYPOINT\\"\\n echo '"'"'if [ -n \\"$1\\" ]; then \\"$@\\"; else /usr/bin/env bash; fi'"'"' >> \\"$ND_ENTRYPOINT\\";\\nfi\\nchmod -R 777 /neurodocker && chmod a+s /neurodocker" \ |
| 113 | + } \ |
| 114 | + }, \ |
| 115 | + { \ |
| 116 | + "name": "env", \ |
| 117 | + "kwds": { \ |
| 118 | + "DEBIAN_FRONTEND": "noninteractive" \ |
| 119 | + } \ |
| 120 | + }, \ |
| 121 | + { \ |
| 122 | + "name": "run", \ |
| 123 | + "kwds": { \ |
| 124 | + "command": "chmod 777 /tmp" \ |
| 125 | + } \ |
| 126 | + }, \ |
| 127 | + { \ |
| 128 | + "name": "install", \ |
| 129 | + "kwds": { \ |
| 130 | + "pkgs": [ \ |
| 131 | + "build-essential", \ |
| 132 | + "git", \ |
| 133 | + "ca-certificates", \ |
| 134 | + "netbase" \ |
| 135 | + ], \ |
| 136 | + "opts": null \ |
| 137 | + } \ |
| 138 | + }, \ |
| 139 | + { \ |
| 140 | + "name": "run", \ |
| 141 | + "kwds": { \ |
| 142 | + "command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n build-essential \\\\\\n ca-certificates \\\\\\n git \\\\\\n netbase \\\\\\n && rm -rf /var/lib/apt/lists/*" \ |
| 143 | + } \ |
| 144 | + }, \ |
| 145 | + { \ |
| 146 | + "name": "env", \ |
| 147 | + "kwds": { \ |
| 148 | + "CONDA_DIR": "/opt/miniconda-py311_24.4.0-0", \ |
| 149 | + "PATH": "/opt/miniconda-py311_24.4.0-0/bin:$PATH" \ |
| 150 | + } \ |
| 151 | + }, \ |
| 152 | + { \ |
| 153 | + "name": "run", \ |
| 154 | + "kwds": { \ |
| 155 | + "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\n# Install dependencies.\\nexport PATH=\\"/opt/miniconda-py311_24.4.0-0/bin:$PATH\\"\\necho \\"Downloading Miniconda installer ...\\"\\nconda_installer=\\"/tmp/miniconda.sh\\"\\ncurl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-py311_24.4.0-0-Linux-x86_64.sh\\nbash \\"$conda_installer\\" -b -p /opt/miniconda-py311_24.4.0-0\\nrm -f \\"$conda_installer\\"\\n# Prefer packages in conda-forge\\nconda config --system --prepend channels conda-forge\\n# Packages in lower-priority channels not considered if a package with the same\\n# name exists in a higher priority channel. Can dramatically speed up installations.\\n# Conda recommends this as a default\\n# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html\\nconda config --set channel_priority strict\\nconda config --system --set auto_update_conda false\\nconda config --system --set show_channel_urls true\\n# Enable `conda activate`\\nconda init bash\\nconda install -y --name base \\\\\\n \\"gxx_linux-64\\" \\\\\\n \\"notebook\\" \\\\\\n \\"jupyterlab\\" \\\\\\n \\"numpy\\" \\\\\\n \\"git-annex\\" \\\\\\n \\"ipywidgets\\"\\n# Clean up\\nsync && conda clean --all --yes && sync\\nrm -rf ~/.cache/pip/*" \ |
| 156 | + } \ |
| 157 | + }, \ |
| 158 | + { \ |
| 159 | + "name": "run", \ |
| 160 | + "kwds": { \ |
| 161 | + "command": "chmod 777 /opt/miniconda-py311_24.4.0-0/share" \ |
| 162 | + } \ |
| 163 | + }, \ |
| 164 | + { \ |
| 165 | + "name": "run", \ |
| 166 | + "kwds": { \ |
| 167 | + "command": "python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu" \ |
| 168 | + } \ |
| 169 | + }, \ |
| 170 | + { \ |
| 171 | + "name": "user", \ |
| 172 | + "kwds": { \ |
| 173 | + "user": "voxelwise" \ |
| 174 | + } \ |
| 175 | + }, \ |
| 176 | + { \ |
| 177 | + "name": "workdir", \ |
| 178 | + "kwds": { \ |
| 179 | + "path": "/home/voxelwise" \ |
| 180 | + } \ |
| 181 | + }, \ |
| 182 | + { \ |
| 183 | + "name": "run", \ |
| 184 | + "kwds": { \ |
| 185 | + "command": "git clone https://github.com/gallantlab/voxelwise_tutorials.git --depth 1" \ |
| 186 | + } \ |
| 187 | + }, \ |
| 188 | + { \ |
| 189 | + "name": "run", \ |
| 190 | + "kwds": { \ |
| 191 | + "command": "python -m pip install voxelwise_tutorials" \ |
| 192 | + } \ |
| 193 | + }, \ |
| 194 | + { \ |
| 195 | + "name": "run", \ |
| 196 | + "kwds": { \ |
| 197 | + "command": "git config --global user.email '"'"'[email protected]'"'"'" \ |
| 198 | + } \ |
| 199 | + }, \ |
| 200 | + { \ |
| 201 | + "name": "run", \ |
| 202 | + "kwds": { \ |
| 203 | + "command": "git config --global user.name '"'"'Your Name'"'"'" \ |
| 204 | + } \ |
| 205 | + }, \ |
| 206 | + { \ |
| 207 | + "name": "workdir", \ |
| 208 | + "kwds": { \ |
| 209 | + "path": "/home/voxelwise/voxelwise_tutorials/tutorials/notebooks/shortclips" \ |
| 210 | + } \ |
| 211 | + }, \ |
| 212 | + { \ |
| 213 | + "name": "entrypoint", \ |
| 214 | + "kwds": { \ |
| 215 | + "args": [ \ |
| 216 | + "/neurodocker/startup.sh" \ |
| 217 | + ] \ |
| 218 | + } \ |
| 219 | + } \ |
| 220 | + ] \ |
| 221 | +}' > /.reproenv.json |
| 222 | +USER voxelwise |
| 223 | +# End saving to specification to JSON. |
0 commit comments