Code Monkey home page Code Monkey logo

deep-visual-search-workshop-infra's Introduction

Welcome to Deep Visual Search CDK project!

This provisions all the required infra in your account for the Deep Visual Search Lab using CDK.

Note: If you're using an AWS provided event engine account, you can skip this as this module will automatically be pre-provisioned in your account.

Please follow along if you're doing the lab in your own account.

Services it will deploy in your account:

  1. Amazon SageMaker Studio and create a new user called MLEngineer
  2. Amazon OpenSearch Service cluster for storing and searching image features
  3. Amazon S3 buckets for training data and hosting the website
  4. Amazon API Gateway + AWS Lambda for Website APIs
  5. Setup IAM roles and permissions

The cdk.json file tells the CDK Toolkit how to execute your app.

This project is set up like a standard Python project. The initialization process also creates a virtualenv within this project, stored under the .venv directory. To create the virtualenv it assumes that there is a python3 (or python for Windows) executable in your path with access to the venv package. If for any reason the automatic creation of the virtualenv fails, you can create the virtualenv manually.

To manually create a virtualenv on MacOS and Linux:

$ python3 -m venv .venv

After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv.

$ source .venv/bin/activate

If you are a Windows platform, you would activate the virtualenv like this:

% .venv\Scripts\activate.bat

Once the virtualenv is activated, you can install the required dependencies.

$ pip install -r requirements.txt

We will need your aws account id and deployment region as environment variables.

$ export ACCOUNT={Your aws account id}
$ export REGION={Your aws region}

This setup will need CDK CLI, docker & NodeJS 16.x to be installed. If you don't have it installed, please follow the links to install it:

Create a directory for frontend code to build

$ mkdir ./frontend/build

If you're using cdk for the first time in your account, please run:

$ ./cdk-bootstrap-to.sh $ACCOUNT $REGION

At this point you can now synthesize the CloudFormation template for this code.

$ ./cdk-synth-to.sh $ACCOUNT $REGION

The next set of commands will deploy your infrastructure to your AWS account

$ ./cdk-deploy-to.sh $ACCOUNT $REGION VisualSearchEngineInfraStack --outputs-file ./frontend/src/config/config.json
$ cd frontend
$ npm install
$ npm run-script build
$ cd ..
./cdk-deploy-to.sh $ACCOUNT $REGION VisualSearchEngineFrontendStack

Enjoy!

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

deep-visual-search-workshop-infra's People

Contributors

dependabot[bot] avatar vatsalshah1990 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.