Giter Club home page Giter Club logo

transformerlab-api's Introduction


Logo

Transformer Lab API

API for Transformer Lab App.
Explore the docs »

API for Transformer Lab

This is the API for the Transformer Lab App which is the main repo for this project. Please go the Transformer Lab App repository to learn more and access documentation.

Use the instructions below if you are installing and running the API on a server, manually.

Requirements

  • Linux or WSL (for training)
  • Mac, Linux, WSL for inference only

Automatic Installation

You can use the install script to get the application running:

./install.sh

This will install conda if it's not installed, and then use conda and pip to install the rest of the application requirements.

Manual Installation

If you prefer to install the API without using the install script you can follow the steps on this page:

https://transformerlab.ai/docs/advanced-install

Run

Once conda and dependencies are installed, run the following:

conda activate transformerlab
uvicorn api:app --port 8000 --host 0.0.0.0

Developers:

Updating Requirements

Dependencies are managed with pip-tools (installed separately). Add new requirements to requirements.in and regenerate their corresponding requirements.txt files by running the following two commands:

# default GPU enabled requirements
pip-compile \
    --extra-index-url=https://download.pytorch.org/whl/cu118 \
    --output-file=requirements.txt \
    requirements-gpu.in requirements.in

# requirements for systmes without GPU support
pip-compile \
    --extra-index-url=https://download.pytorch.org/whl/cpu \
    --output-file=requirements-no-gpu.txt \
    requirements.in

Windows Notes

We have not tested running the API on Windows extensively, but it should work.

On WSL, you might need to install CUDA manually by following:

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local)

then running the following before you launch:

export LD_LIBRARY_PATH=/usr/lib/wsl/lib

transformerlab-api's People

Contributors

dadmobile avatar aliasaria 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.