Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Nov 23, 2023
1 parent 69c48e0 commit 8744321
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
9 changes: 0 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,6 @@ services:
profiles:
- stockfish-analysis

command:
build:
context: docker
dockerfile: command.Dockerfile
volumes:
- ./command:/command
profiles:
- utils

python:
build:
context: docker
Expand Down
5 changes: 0 additions & 5 deletions docker/command.Dockerfile

This file was deleted.

21 changes: 18 additions & 3 deletions lila-docker
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,24 @@ if [ ! -z "$GITPOD_WORKSPACE_ID" ]; then
export PICFIT_DOMAIN=$(gp url 3001 | cut -c9-)
fi

rust_cmd() {
if [ ! -z "$(which rustup)" ]; then
# if the host has rust installed, use it
cargo build --release --manifest-path command/Cargo.toml
./command/target/release/command "$@"
elif [ "$(uname)" = "Darwin" ]; then
docker run --rm -v "$PWD/command:/command" -w /command messense/cargo-zigbuild:0.18.0 \
cargo zigbuild --release --target universal2-apple-darwin
./command/target/universal2-apple-darwin/release/command "$@"
else
docker run --rm -v "$PWD/command:/command" -w /command messense/cargo-zigbuild:0.18.0 \
cargo zigbuild --release
./command/target/release/command "$@"
fi
}

run_setup() {
docker compose run --rm command
./command/target/release/command setup
rust_cmd setup

export $(cat .env | xargs)

Expand All @@ -26,7 +41,7 @@ run_setup() {
fi

if [ "$IS_GITPOD" = "true" ]; then
./command/target/debug/command gitpod-welcome
rust_cmd gitpod-welcome
fi
}

Expand Down

0 comments on commit 8744321

Please sign in to comment.