Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell and other commands not working in Ubuntu linux #736

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
TEMPLATES=$(shell for l in $$(ls ./templates | egrep -v "util|lib|README.md|jest.config.js|package.json|package-lock.json|node_modules|coverage|__tests__|.pytest_cache|.venv-test|pytest.ini|requirements.txt|requirements-test.txt");do echo templates/$$l;done)
ifeq ($(command -v lsblk >/dev/null 2>&1), Linux)
TEMPLATES=$(for l in `ls ./templates | egrep -v "util|lib|README.md|jest.config.js|package.json|package-lock.json|node_modules|coverage|__tests__|.pytest_cache|.venv-test|pytest.ini|requirements.txt|requirements-test.txt"`; do echo templates/$l ; done )
else
TEMPLATES=$(shell for l in $$(ls ./templates | egrep -v "util|lib|README.md|jest.config.js|package.json|package-lock.json|node_modules|coverage|__tests__|.pytest_cache|.venv-test|pytest.ini|requirements.txt|requirements-test.txt");do echo templates/$$l;done)
endif

All: ml_model assets templates lambda website make_directories

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Alternatively, if you want to custom deploy QnABot on AWS, refer to the details

- Run Linux. (tested on Amazon Linux)
- Install npm >8.6.0 and node >18.X.X ([instructions](https://nodejs.org/en/download/))
- Install zsh in case of using Linux OS
- Install and configure git lfs ([instructions](https://git-lfs.com/))
- Clone this repo.
- Set up an AWS account. ([instructions](https://AWS.amazon.com/free/))
Expand Down
2 changes: 1 addition & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*********************************************************************************************************************/

process.env.AWS_PROFILE = require('../config.json').profile;
process.env.AWS_DEFAULT_REGION = require('../config.json').profile;
process.env.AWS_DEFAULT_REGION = require('../config.json').region;
const chalk = require('chalk');
const stringify = require('json-stringify-pretty-compact');
const check = require('./check');
Expand Down
2 changes: 1 addition & 1 deletion bin/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config = require('../config.json');
const fs = require('fs').promises;

process.env.AWS_PROFILE = config.profile;
process.env.AWS_DEFAULT_REGION = config.profile;
process.env.AWS_DEFAULT_REGION = config.region;
const { CloudFormationClient, ValidateTemplateCommand, DescribeStacksCommand } = require('@aws-sdk/client-cloudformation');
const { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3');
const { region } = require('../config.json');
Expand Down
2 changes: 1 addition & 1 deletion bin/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const config = require('../config.json');

process.env.AWS_PROFILE = config.profile;
process.env.AWS_DEFAULT_REGION = config.profile;
process.env.AWS_DEFAULT_REGION = config.region;
const { CloudFormationClient, ListExportsCommand, DescribeStacksCommand } = require('@aws-sdk/client-cloudformation');
const region = require('../config.json').region;
const name = require('./name');
Expand Down
2 changes: 1 addition & 1 deletion bin/launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
const config = require('../config.json');

process.env.AWS_PROFILE = config.profile;
process.env.AWS_DEFAULT_REGION = config.profile;
process.env.AWS_DEFAULT_REGION = config.region;
const { CloudFormationClient, CreateStackCommand, UpdateStackCommand, DescribeStacksCommand, DeleteStackCommand } = require('@aws-sdk/client-cloudformation');
const { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3');

Expand Down
2 changes: 1 addition & 1 deletion bin/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const _ = require('lodash');
const config = require('../config.json');

process.env.AWS_PROFILE = config.profile;
process.env.AWS_DEFAULT_REGION = config.profile;
process.env.AWS_DEFAULT_REGION = config.region;

module.exports = run;

Expand Down
2 changes: 1 addition & 1 deletion bin/wait.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*********************************************************************************************************************/

process.env.AWS_PROFILE = require('../config.json').profile;
process.env.AWS_DEFAULT_REGION = require('../config.json').profile;
process.env.AWS_DEFAULT_REGION = require('../config.json').region;
const { CloudFormationClient, DescribeStacksCommand } = require('@aws-sdk/client-cloudformation');
const region = require('../config.json').region;

Expand Down
2 changes: 1 addition & 1 deletion ml_model/embedding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ DST=../../build/ml_model/e5-large.tar.gz
RESOURCES := $(shell find . )

$(DST): $(RESOURCES)
echo "Building $(NAME)"; sh ./package-model.sh $(DST)
echo "Building $(NAME)"; zsh ./package-model.sh $(DST)