I am trying to deploy a Flask/ML app to Google Cloud but encountering this issue;
When I try to run gcloud builds submit --tag gcr.io/project-name/index with a requirements.txt file, it throws CMake must be installed to build dlib. Since now, I didn't have any problems working with dlib (I have cmake and build-essential already installed) and when I connect Google Cloud Shell via ssh, I can see both build-essential and cmake is installed and up to date on there too.
I tried to build on Ubuntu and Windows machines, same error consists.
Solved! CMake needs to be built in Dockerfile, not locally or in cloud shell.
Adding RUN apt-get update && apt-get -y install cmake before RUN pip install -r requirements.txt in Dockerfile resolved the issue.
Related
I was trying to install thrift(0.11.0) over my system(macOs 10.14.5).For which I downloaded and extracted tar file. Then I ran following commands :
./bootstrap.sh
./configure
make
make install
But make install throwed the following error :
error: could not create '/usr/lib/python2.7/site-packages': Operation not permitted
then I also tried manually creating site-package inside /usr/lib/python2.7 but still the error message was same.
I have also tried sudo while running make install but it didn't helped much.
1.open thrift's subfolder lib/py/ and modify the Makefile as follow:
PY_PREFIX=/usr
change to
PY_PREFIX = /Users/amy/python
2.sudo make install
I faced the same problem trying to install thrift on Mac OS.
I found a separate guide for installing thrift on Mac OS, I tried it and it finally worked successfully:
1- Download the boost library from boost.org untar compile with
./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install
2- Download libevent, untar and compile with
./configure --prefix=/usr/local
make
sudo make install
3- Download the latest version of Apache Thrift, untar and compile with
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local
Try it and let me know your results.
Reference: Apache Thrift - OS X Install
I have set up a GPU Jupyter Notebook VM using the AI platform on Google Cloud. The server runs Debian stretch.
I want to mount a bucket I've created called example onto a folder called /home/jupyter/transfer. I've been following the instructions outlined here but when I run gsfuse example /home/jupyter/transfer I get the error:
ModuleNotFoundError: No module named 'fuse'
I've installed fuse with:
sudo apt-get install fuse
which is successful but the gsfuse code still doesn't run. I then installed the pip package with:
pip install fuse-python
And it still wouldn't work.
Any ideas?
After a lot of trial and error I managed to figure this out. The problem was the python package and where I was installing it.
If you do:
sudo apt-get install fuse
pip install -U fusepy --user
gsfuse example /home/jupyter/transfer --background
It'll work (where --background) runs the mount in the backgroud.
I was able to run the C++ Program and build & test it using GitLab CI unit with the help of Docker Image of gcc. But now I want to compile the program in docker using cmake instead of g++. How to change the '.gitlab-ci.yml' file to support cmake.
Current File : .gitlab-ci.yml
image: gcc
before_script:
- apt-get install --yes cmake libmatio-dev libblas-dev libsqlite3-dev libcurl4-openssl-dev
- apt-get install --yes libarchive-dev liblzma-dev
build:
script:
- ./runner.sh
- ./bin/hello
./runner.sh
cmake -H. -Bbuild
cmake --build build -- -j3
I think you need to add apt-get update in order to get cmake to install. See this
image: gcc
before_script:
- apt-get update --yes
- apt-get install --yes cmake
build:
script:
- ./runner.sh
- ./bin/hello
In general, you can figure stuff out by jumping into the docker image to debug (in your case the image is the debian-based gcc:latest):
sudo docker run -it --rm gcc
If you had run your original apt-get install command inside the gcc container, you would have seen following error message that you could have then googled to figure out that apt-get update was needed
sudo docker run -it --rm gcc apt-get install --yes cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package cmake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'cmake' has no installation candidate
As this blog post mentions, you can do a test run locally by downloading the gitlab-runner executable:
gitlab-runner exec docker build
Running the gitlab-runner locally will have gitlab clone your repo and run through all the steps in the .gitlab-ci.yml and you can see the output and debug locally rather quickly.
I am trying to install docker from the source code downloaded from github.com/docker/docker
I am unable to install it from the source code .
The Makefile present creates a image , but i want to install it in my system.
Can anyone suggest solution ?
I am using UBUNTU 14.04
Well, idk if this works for your linux distro. (looks like it is ubuntu) but i run kali linux and even if we have different commands to use the process is just as same in every linux distro.
first, before we jump on, we need to update our linux repos.(repositories)
sudo apt update
and,
sudo apt-get update
then,
sudo apt install git
[This installs git]
Now we can start cloning git repos. into our system
go to your desired folder/working directory and type:
sudo git clone "link of the git repo. without the commas"
i would better suggest you to just:
sudo apt install docker.io
[To install docker by apt]
it's better to install it via the docker package and update it to the last version. This is the best way to install docker.
sudo apt-get install python-Orange
or
sudo apt-get install python-orange
doesn't work
sudo python setup.py install
sudo python setup.py build
is not working as well.
Can anyone help??
Python has two tools for easy installation of all programs that are listed on the Python Package Index, also known as PyPi: These are easy_install and pip. Both retrieve very recent versions of Orange (and of any other package that is updating its PyPi entry regularly).
I installed Orange on Ubuntu 12.04 (LTS) with
pip install orange.
You will see lots of log lines indicating that Pip is downloading and compiling Orange for you. Simply wait. When pip is ready, fire up python and try to import orange. If that works, quit python and try the GUI with python /usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/orngCanvas.pyw (you probably want to create a shell alias or bash script for that one :-)
NOTE: on 12.04 I needed to first upgrade 'distribute' itself with sudo easy_install -U distribute but this was clearly indicated by pip.
https://pypi.python.org/pypi/Orange/2.6/
You need to extract the dowloaded tarball on that page to a folder and then change directory to that folder. Then the sudo python setup.py... instructions will work (but you should 'build' the application before you 'install' it).
go to the given link "https://pypi.python.org/pypi/Orange/2.6/"
download the package and extract the file
install with given command
python setup.py build
python setup.py install
note:- during installation make sure that your net is working because it downloads required packages. Also it may ask for C++ or gcc compilers while installing and could be terminate just read the errors care fully and install requires packages from the synaptic package manage in ubuntu.