@@ -55,8 +55,8 @@ RUN python --version && \
5555 find / -xdev -name __pycache__ -type d -exec rm -rf {} \+
5656
5757RUN . ~/.bashrc && \
58- nvm install 22 && \
59- nvm alias default 22 && \
58+ nvm install --lts && \
59+ nvm alias default lts/* && \
6060 nvm use default && \
6161 rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /root/.nvm && \
6262 nvm uninstall 14 && \
@@ -77,7 +77,7 @@ RUN cd /opt && \
7777 pip install --no-cache-dir -e .[mount] && \
7878 pip install --no-cache-dir -e clients/python && \
7979 cd girder/web && \
80- npm ci && \
80+ npm ci || npm install && \
8181 npm run build && \
8282 find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
8383 rm -rf /root/.cache /root/.npm /tmp/* && \
@@ -90,57 +90,59 @@ RUN cd /opt/girder/worker && \
9090 cd /opt/girder/plugins/worker && \
9191 pip install --no-cache-dir -e .[girder,worker] && \
9292 cd girder_plugin_worker/web_client && \
93- npm ci && \
93+ npm ci || npm install && \
9494 npm run build && \
9595 find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
9696 rm -rf /root/.cache /root/.npm /tmp/* && \
9797 find / -xdev -name __pycache__ -type d -exec rm -rf {} \+ && \
9898 true
9999
100- # Girder plugins
100+ # Girder plugins. If we are installing from source, use npm install if npm ci
101+ # false, since npm ci can fail if the package-lock was generated with ai
102+ # different npm version.
101103RUN true && \
102104 cd /opt/girder/plugins/hashsum_download && \
103105 pip install --no-cache-dir -e . && \
104106 cd girder_hashsum_download/web_client && \
105- npm ci && \
107+ npm ci || npm install && \
106108 npm run build && \
107109 cd /opt/girder/plugins/homepage && \
108110 pip install --no-cache-dir -e . && \
109111 cd girder_homepage/web_client && \
110- npm ci && \
112+ npm ci || npm install && \
111113 npm run build && \
112114 cd /opt/girder/plugins/jobs && \
113115 pip install --no-cache-dir -e . && \
114116 cd girder_jobs/web_client && \
115- npm ci && \
117+ npm ci || npm install && \
116118 npm run build && \
117119 cd /opt/girder/plugins/ldap && \
118120 pip install --no-cache-dir -e . && \
119121 cd girder_ldap/web_client && \
120- npm ci && \
122+ npm ci || npm install && \
121123 npm run build && \
122124 cd /opt/girder/plugins/oauth && \
123125 pip install --no-cache-dir -e . && \
124126 cd girder_oauth/web_client && \
125- npm ci && \
127+ npm ci || npm install && \
126128 npm run build && \
127129 cd /opt/girder/plugins/user_quota && \
128130 pip install --no-cache-dir -e . && \
129131 cd girder_user_quota/web_client && \
130- npm ci && \
132+ npm ci || npm install && \
131133 npm run build && \
132134 cd /opt/girder/plugins/import_tracker && \
133135 pip install --no-cache-dir -e . && \
134136 cd girder_import_tracker/web_client && \
135- npm ci && \
137+ npm ci || npm install && \
136138 npm run build && \
137139 # virtual_folders has no web_client \
138140 cd /opt/girder/plugins/virtual_folders && \
139141 pip install --no-cache-dir -e . && \
140142 cd /opt/girder/plugins/slicer_cli_web && \
141143 pip install --no-cache-dir -e . && \
142144 cd slicer_cli_web/web_client && \
143- npm ci && \
145+ npm ci || npm install && \
144146 npm run build && \
145147 find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
146148 rm -rf /root/.cache /root/.npm /tmp/* && \
@@ -152,13 +154,13 @@ RUN cd /opt && \
152154 cd /opt/large_image && \
153155 pip install --no-cache-dir --find-links https://girder.github.io/large_image_wheels -e .[memcached] -rrequirements-dev.txt && \
154156 cd /opt/large_image/girder/girder_large_image/web_client && \
155- npm ci && \
157+ npm ci || npm install && \
156158 npm run build && \
157159 cd /opt/large_image/girder_annotation/girder_large_image_annotation/web_client && \
158- npm ci && \
160+ npm ci || npm install && \
159161 npm run build && \
160162 cd /opt/large_image/sources/dicom/large_image_source_dicom/web_client && \
161- npm ci && \
163+ npm ci || npm install && \
162164 npm run build && \
163165 rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /opt/venv && \
164166 find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
@@ -174,7 +176,7 @@ RUN cd /opt && \
174176 sed -i 's/==1\. 3.*' \' '/' \' '/g' setup.py && \
175177 pip install --no-cache-dir -e .[analysis] && \
176178 cd /opt/HistomicsUI/histomicsui/web_client && \
177- npm ci && \
179+ npm ci || npm install && \
178180 # This builds both the app and the plugin \
179181 npm run build && \
180182 rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /opt/venv && \
@@ -189,7 +191,7 @@ RUN cd /opt && \
189191 cd /opt/girder_assetstore && \
190192 pip install --no-cache-dir -e . && \
191193 cd /opt/girder_assetstore/girder_assetstore/web_client && \
192- npm ci && \
194+ npm ci || npm install && \
193195 npm run build && \
194196 find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
195197 rm -rf /root/.cache /root/.npm /tmp/* && \
0 commit comments