Skip to content
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ playwright/.cache/

wandb/
*.checkpoint
mkcert_development_CA_*.crt
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,5 @@ lib-default-features = false
# Optional. Defaults to "release".
lib-profile-release = "wasm-release"

[[workspace.metadata.leptos]]
# project name
name = "chatclm"
# The binary target to use when multiple bin targets are defined
bin-target = "chatclm"
#lib-package = "front"

20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ FROM rustlang/rust:nightly-bookworm as builder
# If you’re using stable, use this instead
# FROM rust:1.74-bullseye as builder

# Install cargo-binstall, which makes it easier to install other
# cargo extensions like cargo-leptos
RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
RUN cp cargo-binstall /usr/local/cargo/bin

# Install cargo-leptos
RUN cargo binstall [email protected] -y
# Install CA certificates for SSL verification and build dependencies including WASM support
RUN apt-get update && apt-get install -y ca-certificates build-essential clang wasi-libc && rm -rf /var/lib/apt/lists/*

# Copy and trust the mkcert development CA for the proxy
COPY mkcert_development_CA_*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates

# Set environment variables for WASM compilation
ENV CFLAGS_wasm32_unknown_unknown="--sysroot=/usr/share/wasi-sysroot"

# Install cargo-leptos using cargo install
RUN cargo install [email protected] --locked

# Add the WASM target
RUN rustup target add wasm32-unknown-unknown
Expand Down