My dockerfile has below,
FROM ubuntu:20.04
RUN apt install -y aptitude
RUN aptitude -f install python-dev
Manual aptitude -f install python-dev installation inside the container prompts option to choose n and Y, Same as follows.
The following NEW packages will be installed:
libpython-dev{a} libpython-stdlib{a} python{a} python-dev python-minimal{a}
0 packages upgraded, 5 newly installed, 0 to remove and 5 not upgraded.
Need to get 182 kB of archives. After unpacking 898 kB will be used.
The following packages have unmet dependencies:
libpython2-stdlib : Breaks: libpython-stdlib (< 2.7.15-2) but 2.7.11-1 is to be installed
python2 : Breaks: python (< 2.7.15-2) but 2.7.11-1 is to be installed
python2-minimal : Breaks: python-minimal (< 2.7.15-2) but 2.7.11-1 is to be installed
python-is-python2 : Breaks: python but 2.7.11-1 is to be installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libpython-stdlib [Not Installed]
2) python [Not Installed]
3) python-dev [Not Installed]
4) python-minimal [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Remove the following packages:
1) libpython2-stdlib [2.7.17-2ubuntu4 (focal, now)]
2) mic [0.28.6 (now)]
3) python-is-python2 [2.7.17-4 (focal, now)]
4) python-pycurl [7.43.0.2-1ubuntu5 (focal, now)]
5) python-pyparsing [2.4.6-1 (focal, now)]
6) python-rpm [4.14.2.1+dfsg1-1build2 (focal, now)]
7) python-urlgrabber [3.9.1-4ubuntu3 (now)]
8) python2 [2.7.17-2ubuntu4 (focal, now)]
9) python2-minimal [2.7.17-2ubuntu4 (focal, now)]
Leave the following dependencies unresolved:
10) python2-minimal recommends python2
Accept this solution? [Y/n/q/?] y
My goal is to build the docker image through dockerfile. So in Dockerfile how to respond the n and y prompts automatically for the above case? Any help would be highly appreciated.
You can disable interactive prompting from apt by setting the DEBIAN_FRONTEND environment variable to noninteractive. This is documented in the debconf(7) man page. That would look something like:
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y python-dev
Related
I am trying to launch, via docker, a jupyterlab with a custom extension(extensionTest). However, I haven't been successful.
Can someone tell me how can i do it? Or put here an example?
What is the best base docker image to use?
Thank you
Best regards
I tried doing this dockerfile, but is not working :
FROM jupyter/minimal-notebook:lab-3.2.3
RUN pip install --no-cache-dir \
astropy \
ipytree \
ipywidgets \
jupyter \
numpy \
poliastro
RUN jupyter labextension install \
jupyterlab-plotly#4.14.2 \
plotlywidget#4.14.2
RUN pip install jupyterlab_widgets
COPY ./extensions/ ./extensions/
WORKDIR ./extensions/
RUN python -m pip install ./extensionTest
RUN jupyter labextension extensionTest
ENTRYPOINT start.sh jupyter lab
Thanks
Error that I get :
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python /opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp2m0biqur
cwd: /home/jovyan/extensions/extensionTest
Complete output (44 lines):
INFO:hatch_jupyter_builder.utils:Running jupyter-builder
INFO:hatch_jupyter_builder.utils:Building with hatch_jupyter_builder.npm_builder
INFO:hatch_jupyter_builder.utils:With kwargs: {'build_cmd': 'build:prod', 'npm': ['jlpm']}
INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm. This may take a while...
INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-gj35ixm0/overlay/bin/jlpm install
yarn install v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning #jupyterlab/application > #jupyterlab/apputils > url > querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning #jupyterlab/application > #jupyterlab/ui-components > #blueprintjs/core > popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
warning #jupyterlab/application > #jupyterlab/ui-components > #blueprintjs/core > react-popper > popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
warning #jupyterlab/builder > terser-webpack-plugin > cacache > #npmcli/move-file#1.1.2: This functionality has been moved to #npmcli/fs
warning #jupyterlab/builder > #jupyterlab/buildutils > crypto#1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request > har-validator#5.1.5: this library is no longer supported
warning #jupyterlab/builder > #jupyterlab/buildutils > verdaccio > request > uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[2/4] Fetching packages...
warning #blueprintjs/core#3.54.0: Invalid bin entry for "upgrade-blueprint-2.0.0-rename" (in "#blueprintjs/core").
warning #blueprintjs/core#3.54.0: Invalid bin entry for "upgrade-blueprint-3.0.0-rename" (in "#blueprintjs/core").
error lib0#0.2.58: The engine "node" is incompatible with this module. Expected version ">=14". Got "12.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-gj35ixm0/overlay/lib/python3.9/site-packages/hatchling/build.py", line 41, in build_wheel
return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
File "/tmp/pip-build-env-gj35ixm0/overlay/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 136, in build
build_hook.initialize(version, build_data)
File "/tmp/pip-build-env-gj35ixm0/normal/lib/python3.9/site-packages/hatch_jupyter_builder/plugin.py", line 83, in initialize
raise e
File "/tmp/pip-build-env-gj35ixm0/normal/lib/python3.9/site-packages/hatch_jupyter_builder/plugin.py", line 78, in initialize
build_func(self.target_name, version, **build_kwargs)
File "/tmp/pip-build-env-gj35ixm0/normal/lib/python3.9/site-packages/hatch_jupyter_builder/utils.py", line 114, in npm_builder
run(npm_cmd + ["install"], cwd=str(abs_path))
File "/tmp/pip-build-env-gj35ixm0/normal/lib/python3.9/site-packages/hatch_jupyter_builder/utils.py", line 227, in run
return subprocess.check_call(cmd, **kwargs)
File "/opt/conda/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-env-gj35ixm0/overlay/bin/jlpm', 'install']' returned non-zero exit status 1.
So, to anyone interested i was able to create a docker file that builds and run you jupyter extension. My code is this:
FROM node:14 AS build-env
RUN apt-get update && \
apt-get install -y python3-pip && \
pip3 install jupyterlab
COPY Path/to/Extension Path/to/Extension
WORKDIR Path/to/extension
RUN yarn install && yarn build && yarn run build
FROM jupyter/minimal-notebook:lab-3.2.3
RUN pip install --no-cache-dir \
astropy \
ipytree \
ipywidgets \
jupyter \
numpy \
poliastro
RUN jupyter labextension install \
jupyterlab-plotly#4.14.2 \
#jupyter-widgets/jupyterlab-manager \
plotlywidget#4.14.2
COPY --from=build-env Path/to/Extension/on/Nodejs Path/to/Extension
RUN jupyter labextension install Path/to/Extension
If someone knows something that can be simplified, let me know :)
I am trying to install pymol in CentOS 7 system. I installed the dependency glm-devel-0.9.6.3-1.el7.noarch by yum:
sudo yum install glm-devel.
During compiling I got an error related to glm as following:
layer1/SceneView.cpp:34:61: error: no matching function for call to ‘equal(const vec3&, const vec3&, float)’
Could anyone tell why this error appears?
I will appreciate any help!
Best regards.
install pymol in CentOS 7
Build example with updated glm-devel
# yum install mmtf-cpp-devel.x86_64 glew-devel.x86_64 libpng-devel freetype-devel msgpack-devel libxml2-devel python36-qt5-devel.x86_64 freeglut-devel mesa-libGL-devel.x86_64 python3-devel
# yum install ./glm-devel-0.9.9.6-6.el7.noarch.rpm
## works with the default python3 (3.6.8) and g++ -4.8.5
Link, glm-devel-0.9.9.6-6.el7 https://drive.google.com/file/d/1BXygEWqpvlbZg867dsXuW47T67Z0V0Q8/view?usp=sharing
https://github.com/schrodinger/pymol-open-source →
https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL
git clone https://github.com/schrodinger/pymol-open-source.git
cd pymol-open-source/
python3 setup.py build
# python3 setup.py install
pymol ## the pymol GUI opens OK
There is also a binary version available, with python 3.7 included : https://pymol.org/2/ →
https://pymol.org/installers/PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2 → tar xvf PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2
cd pymol/ && ./pymol
I am building a dockerfile that following commands:
RUN sudo apt-get install python-pip -y && \
pip install --upgrade pip && \
pip install qibuild
RUN qibuild config --wizard -1 -2
Now in qibuild wizard. I have following:
qibuild config --wizard
Found CMake: /usr/local/bin/cmake
:: Please choose a generator
1 Unix Makefiles (default)
2 Ninja
3 CodeBlocks - Ninja
4 CodeBlocks - Unix Makefiles
5 Eclipse CDT4 - Ninja
6 Eclipse CDT4 - Unix Makefiles
7 KDevelop3
8 KDevelop3 - Unix Makefiles
9 Sublime Text 2 - Ninja
10 Sublime Text 2 - Unix Makefiles
> 1
:: Please choose an IDE
1 None (default)
2 QtCreator
3 Eclipse CDT
> 2
:: Found QtCreator: /usr/bin/qtcreator
:: Do you want to use qtcreator from /usr/bin/qtcreator?
Answer 'no' if you installed qtcreator from Nokia's installer (Y/n)
> Y
I want to make selection 1,2 and Y from dockerfile only.
I have already tried:
qibuild config --wizard -1 as well as
qibuild config --wizard &&1
But docker script fails at selection. How to I make such selection?
I am trying to install docker on rhel 7.
Step 1
yum remove docker docker-common docker-selinux docker-engine-selinux docker-engine docker-ce
Step 2
yum install -y yum-utils device-mapper-persistent-data lvm2
Step 3
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Step 4
yum install docker-ce
Error I am getting is:
yum install docker-ce
Loaded plugins: langpacks, product-id, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:18.06.1.ce-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-
18.06.1.ce-3.el7.x86_64
--> Processing Dependency: libseccomp >= 2.3 for package: docker-ce-18.06.1.ce-3.el7.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-ce-18.06.1.ce-3.el7.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.21-1.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-3.el7 will be installed
--> Processing Conflict: docker-ee-selinux-17.03.2.ee.9-1.el7.noarch conflicts docker-selinux
--> Processing Conflict: docker-ee-selinux-17.03.2.ee.9-1.el7.noarch conflicts docker-engine-selinux
--> Finished Dependency Resolution
Error: docker-ee-selinux conflicts with 2:container-selinux-2.21-1.el7.noarch
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I tried both the suggested options, but it didn't work. I know that I should not be using docker-ce on rhel, but it is just for POC.
Any help is appreciated.
TIA
for fixing conflict error just try
yum remove docker-ee-selinux
then install your desired package.
try to remove docker-selinux first and then install the desired package,
yum remove docker-selinux
Command: yum -y install docker-ce
Result:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:18.06.0.ce-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-18.06.0.ce-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: docker-ce-18.06.0.ce-3.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Resolved with installing container-selinux-2.9 dependency with following command:
sudo yum install ftp://bo.mirror.garr.it/1/slc/centos/7.1.1503/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm
Use below link to install container-selinux from a trust able source
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.55-1.el7.noarch.rpm
Steps to install Docker-CE on RHEL 7.5
https://github.com/dineshsood/dockers/wiki
This docker-ce version worked for me:
sudo yum -y install docker-ce-cli.x86_64 1:19.03.5-3.el7
Best of luck!
You can enable the Extras repository in the path:
/etc/yum.repos.d/CentOS-Base.repo
You need to enable CentOS "extras" repository.
Here's how I did it:
Open /etc/yum.repos.d/CentOS-Base.repo
Duplicate contents of the file, so it becomes twice as long
Replace /os/ in the URL with /extras/
Change the section title in square brackets
E.g.:
[CentOS-Base]
name=CentOS 7 Base Mirror
baseurl=http://mirror.centos.org/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[CentOS-Extras]
name=CentOS 7 Extras
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Then try installing docker again
I had to add --nogpgcheck to the selected answer de to an error
Public key for container-selinux-2.9-4.el7.noarch.rpm is not installed