-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (29 loc) · 761 Bytes
/
Makefile
File metadata and controls
42 lines (29 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
MODELS_DIR ?= $(shell pwd)
PORT ?= 8080
OCAML_COMPILER := 4.14.0
DC_RUN_VARS := USER_NAME=${USER} \
CURRENT_UID=${CURRENT_UID} \
CURRENT_GID=${CURRENT_GID} \
OCAML_COMPILER=${OCAML_COMPILER} \
MODELS_DIR=${MODELS_DIR} \
PORT=${PORT}
all:
@dune build @all
format:
@dune build @fmt --auto-promote
WATCH ?= @all
watch:
@dune build $(WATCH) -w
clean:
@dune clean
.PHONY: diffusers-ocaml
diffusers-ocaml:
sudo ${DC_RUN_VARS} docker compose -f docker-compose.yml run --service-ports diffusers-ocaml bash
.PHONY: diffusers-ocaml-rebuild
diffusers-ocaml-rebuild:
sudo ${DC_RUN_VARS} docker compose -f docker-compose.yml build
.PHONY: kill
kill:
sudo docker kill $(shell docker ps -q)