Skip to content

Commit

Permalink
Build for Linux (#22)
Browse files Browse the repository at this point in the history
* Build for Linux with CUDA

* Disable CUDA for testing

* Disable CUDA for testing

* Disable CUDA for Linux

* Disable CUDA for Linux

* Enable checkout lfs
  • Loading branch information
clarkmcc authored Jul 31, 2023
1 parent 102fa2d commit b2c70f5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ jobs:
platform:
- macos-latest
- windows-latest
- ubuntu-20.04
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ pdf-extract = "0.6.5"
llm = { git = "https://github.com/rustformers/llm", branch = "main", features = ["metal"] }
cocoa = "0.24.1"

# TODO: Figure out how to get CUDA working on Linux without ruining CUDA-less testing
[target.'cfg(target_os = "windows")'.dependencies]
llm = { git = "https://github.com/rustformers/llm", branch = "main", features = ["cublas"] }

# TODO: Support CUDA on Linux
[target.'cfg(any(not(target_os = "macos"), not(target_os = "windows")))'.dependencies]
[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies]
llm = { git = "https://github.com/rustformers/llm", branch = "main", features = [] }

[features]
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

#[cfg_attr(
all(not(test), any(target_os = "windows", target_os = "linux")),
feature(cublas)
)]
extern crate llm;

mod config;
mod events;
mod models;
Expand Down

0 comments on commit b2c70f5

Please sign in to comment.