ssh command Connect() error: getting SSH authentication methods: ssh: no key found - ssh

I am trying to test and deploy a GitLab Project using the GitLab CI/CD. I am using a specific SSH runner for the project which runs on a virtual windows machine.
The runner recognizes the jobs.
However, when starting the pipeline, the runner stops with the following error message:
ERROR: Job failed (system failure): ssh command Connect() error: getting SSH authentication methods: ssh: no key found duration_s=9.0473929 job=3xxxxxxx4 project=4xxxxxxx0 runner=zxxxxxxj
This is my .gitlab-ci.yml file:
image: python:3.11.0-buster
stages:
- test
- deploy
cache:
paths:
- .cache/pip
- venv/
tests:
stage: test
tags:
- windows
before_script:
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install python --version=3.11 -y -f
- dir
# - choco install pip -Y
- C:\\Python311\\python.exe -m pip install --upgrade pip
- C:\\Python311\\python.exe -m pip install --upgrade setuptools
- C:\\Python311\\python.exe -m pip install -r requirements.txt
- where python
- C:\\Python311\\python.exe -m pip install virtualenv
script:
- dir
- C:\\Python311\\python.exe -m pytest src\tests\test_converter.py -p no:faulthandler
- C:\\Python311\\python.exe -m pytest src\tests\test_magicbytes.py -p no:faulthandler
# - C:\\Python311\\python.exe -m pytest src\tests\test_app.py -p no:faulthandler # collects items but does not start test
deploy-prod:
stage: deploy
tags:
- specificrunner
before_script:
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install python --version=3.11 -y -f
- dir
# - choco install pip -Y
- C:\\Python311\\python.exe -m pip install --upgrade pip
- C:\\Python311\\python.exe -m pip install --upgrade setuptools
- C:\\Python311\\python.exe -m pip install -r requirements.txt
- where python
- C:\\Python311\\python.exe -m pip install virtualenv
script:
- echo "Deployment"

Related

Unable to run a react native apps by docker container

I am trying to dockerize react native app but can't do.When i am running docker-compose build command it shows following issues.
error: cannot communicate with server: Post http://localhost/v2/snaps/android-studio: dial unix /run/snapd.socket: connect: no such file or directory
Dockerfile:
FROM ubuntu:20.04
RUN apt update && apt-get install -y curl \
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs
# Install android sdk
RUN apt-get install -y snapd
RUN snap install android-studio
WORKDIR /node
RUN npm install -i -g --force react-native-cli
RUN npm install -g --force react-native
COPY ["package.json", "package-lock.json", "./"]
RUN npm install -f --silent
Compose file:
version: '3.7'
services:
pd_rn:
build:
context: .
command: ["react-native", "start"]
ports:
- 8081:8081
volumes:
- ./:/node

How to install Tensorflow federated directly from GitHub or local download?

I want to have access to features from TensorFlow federated (tff.python.research) which aren't present with the pip3 install method.
I'm working on a remote server that does not have bazel, thus I cannot build from source. Are there other ways to get and install the latest working version of TFF from its GitHub REPO?
(https://github.com/tensorflow/federated)
To install the latest Tensorflow 2.0 federated, you may follow the steps below.
Install TensorFlow Federated using pip
Install the Python development environment
On Ubuntu:
$ sudo apt update
$ sudo apt install python3-dev python3-pip # Python 3
$ sudo pip3 install --upgrade virtualenv # system-wide install
On macOS:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
$ brew update
$ brew install python # Python 3
$ sudo pip3 install --upgrade virtualenv # system-wide install
Create a virtual environment
$ virtualenv --python python3 "venv"
$ source "venv/bin/activate"
(venv) $ pip install --upgrade pip
Note: To exit the virtual environment, run deactivate.
Install the TensorFlow Federated pip package.
(venv) $ pip install --upgrade tensorflow_federated
(Optional) Test Tensorflow Federated.
(venv) $ python -c "import tensorflow_federated as tff; print(tff.federated_computation(lambda: 'Hello World')())"
Build the TensorFlow Federated pip package
Install the Python development environment.
On Ubuntu:
$ sudo apt update
$ sudo apt install python3-dev python3-pip # Python 3
$ sudo pip3 install --upgrade virtualenv # system-wide install
On macOS:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
$ brew update
$ brew install python # Python 3
$ sudo pip3 install --upgrade virtualenv # system-wide install
Install Bazel
Install Bazel, the build tool used to compile Tensorflow Federated.
Clone the Tensorflow Federated repository.
$ git clone https://github.com/tensorflow/federated.git
$ cd "federated"
Create a virtual environment.
$ virtualenv --python python3 "venv"
$ source "venv/bin/activate"
(venv) $ pip install --upgrade pip
Note: To exit the virtual environment, run deactivate.
Install Tensorflow Federated dependencies.
(venv) $ pip install --requirement "requirements.txt"
(Optional) Test Tensorflow Federated.
(venv) $ bazel test //tensorflow_federated/...
Create a new project.
$ mkdir "/tmp/project"
$ cd "/tmp/project"
$ virtualenv --python python3 "venv"
$ source "venv/bin/activate"
(venv) $ pip install --upgrade pip
Note: To exit the virtual environment run deactivate.
Install the pip package.
(venv) $ pip install --upgrade "/tmp/tensorflow_federated/tensorflow_federated-"*".whl"
Test Tensorflow Federated.
(venv) $ python -c "import tensorflow_federated as tff; print(tff.federated_computation(lambda: 'Hello World')())"
Reference: https://www.tensorflow.org/federated/install

My test stage in GitLab CI won't get picked up by the pipeline

I'm trying to have 2 types of tests run depending on why the pipeline is being run. On commits I'd like to run my build stage, and on merge requests I'd like to run my build and test stages. When I do a commit it runs only build but it also only runs build on Merge Requests.
I've tried specifying only:merge_requests in my .gitlab-ci.yml but it still won't register the stage.
stages:
- build
- deploy
- test
- deploy_prod
build:
image: "python:3.6.1"
stage: build
variables:
GIT_SUBMODULE_STRATEGY: 'recursive'
script:
- pip install --upgrade pip
- pip install -r lender_v2/requirements.txt
- pip install -r lender_v2/reggora_models/requirements.txt
- export FLASK_CONFIG=localhost
- cd lender_v2/smoke_tests && python3 -m unittest discover -p "smoke_*.py" -q --failfast
test:
image: "python:3.6.1"
stage: test
variables:
GIT_SUBMODULE_STRATEGY: 'recursive'
script:
- pip install --upgrade pip
- pip install -r lender_v2/requirements.txt
- pip install -r lender_v2/reggora_models/requirements.txt
- export FLASK_CONFIG=localhost
- cd lender_v2/test_project && python3 -m unittest discover ../test_project -p "test_*.py" -q --failfast
only:
- merge_requests
I thought this should run the test stage on merge_requests but it won't run at any time.
Which GitLab and GitLab runner versions are you using?
only: merge_requests was introduced in Gitlab 11.6.
Also, note the information from the Docs:
As of GitLab 11.10, pipelines for merge requests require GitLab Runner
11.9 or higher due to the recent refspecs changes. Anything lower will cause the pipeline to fail.
Gitlab documentation recommends using 'rules' instead of 'only'. You can accomplish only merge_requests by doing the following:
stages:
- build
- deploy
- test
- deploy_prod
build:
image: "python:3.6.1"
stage: build
variables:
GIT_SUBMODULE_STRATEGY: 'recursive'
script:
- pip install --upgrade pip
- pip install -r lender_v2/requirements.txt
- pip install -r lender_v2/reggora_models/requirements.txt
- export FLASK_CONFIG=localhost
- cd lender_v2/smoke_tests && python3 -m unittest discover -p "smoke_*.py" -q --failfast
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
test:
image: "python:3.6.1"
stage: test
variables:
GIT_SUBMODULE_STRATEGY: 'recursive'
script:
- pip install --upgrade pip
- pip install -r lender_v2/requirements.txt
- pip install -r lender_v2/reggora_models/requirements.txt
- export FLASK_CONFIG=localhost
- cd lender_v2/test_project && python3 -m unittest discover ../test_project -p "test_*.py" -q --failfast
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
https://docs.gitlab.com/ee/ci/yaml/#workflowrules

Tensorflow Serving basic example

I am working through the Tensorflow serving_basic example at:
https://tensorflow.github.io/serving/serving_basic
Setup
Following: https://tensorflow.github.io/serving/setup#prerequisites
Within a docker container based off of ubuntu:latest, I have installed:
bazel:
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key
sudo apt-get update && sudo apt-get install bazel
sudo apt-get upgrade bazel
grpcio:
pip install grpcio
all packages:
sudo apt-get update && sudo apt-get install -y build-essential curl libcurl3-dev git libfreetype6-dev libpng12-dev libzmq3-dev pkg-config python-dev python-numpy python-pip software-properties-common swig zip zlib1g-dev
tensorflow serving:
git clone --recurse-submodules https://github.com/tensorflow/serving
cd serving
cd tensorflow
./configure
cd ..
I've built the source with bazel and all tests ran successfully:
bazel build tensorflow_serving/...
bazel test tensorflow_serving/...
I can successfully export the mnist model with:
bazel-bin/tensorflow_serving/example/mnist_export /tmp/mnist_model
And I can serve the exported model with:
bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=9000 --model_name=mnist --model_base_path=/tmp/mnist_model/
The problem
When I test the server and try to connect a client to the model server with:
bazel-bin/tensorflow_serving/example/mnist_client --num_tests=1000 --server=localhost:9000
I see this output:
root#dc3ea7993fa9:~/serving# bazel-bin/tensorflow_serving/example/mnist_client --num_tests=2 --server=localhost:9000
Extracting /tmp/train-images-idx3-ubyte.gz
Extracting /tmp/train-labels-idx1-ubyte.gz
Extracting /tmp/t10k-images-idx3-ubyte.gz
Extracting /tmp/t10k-labels-idx1-ubyte.gz
AbortionError(code=StatusCode.NOT_FOUND, details="FeedInputs: unable to find feed output images")
AbortionError(code=StatusCode.NOT_FOUND, details="FeedInputs: unable to find feed output images")
Inference error rate is: 100.0%
The "--use_saved_model" model flag is set to default "true"; use the --use_saved_model=false when starting the server. This should work:
bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --use_saved_model=false --port=9000 --model_name=mnist --model_base_path=/tmp/mnist_model/
I mentioned this on the tensorflow github, and the solution was to remove the original model that had been created. If you're running into this, run
rm -rf /tmp/mnist_model
and rebuild it

Travis CI for a Qt5 project

I am trying to use Travis CI with a Qt5 project, but I can't get the build to pass.
My .travis.yml
install:
- sudo apt-get update
- sudo apt-get install qt5-default qttools5-dev-tools
script:
- qmake -project
- qmake Ultron.pro
- make
Last segment of the error log:
0.58s$ sudo apt-get install qt5-default qttools5-dev-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package qt5-default
E: Unable to locate package qttools5-dev-tools
The command "sudo apt-get install qt5-default qttools5-dev-tools" failed and exited with 100 during .
Your build has been stopped.
Full log: http://pastebin.ubuntu.com/8296581/
Does this have something to do with it not being an official package?
You need to add the correct repository and update apt:
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
sudo apt-get update -qq
Your .travis.yml will then look like:
before_install:
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev
- sudo apt-get install qt5-default qttools5-dev-tools
script:
- qmake -project
- qmake Ultron.pro
- make
see: Travis CI config to build against Qt5.0 on Ubuntu 12.04. Requires installing a PPA and certain packages for qt5 support. (jreese / gist:6207161)