projects
/
lightning.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix deadlock at container finish.
[lightning.git]
/
cmd.go
diff --git
a/cmd.go
b/cmd.go
index 0fdad66a46d4d9284afa0e4b14902f95899c67ce..b10b1caa3fc4a65531de88e6818013a628380494 100644
(file)
--- a/
cmd.go
+++ b/
cmd.go
@@
-1,4
+1,8
@@
-package main
+// Copyright (C) The Lightning Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+package lightning
import (
"fmt"
import (
"fmt"
@@
-6,6
+10,8
@@
import (
"io/ioutil"
"os"
"os/exec"
"io/ioutil"
"os"
"os/exec"
+ "runtime/debug"
+ "strings"
"git.arvados.org/arvados.git/lib/cmd"
"github.com/mattn/go-isatty"
"git.arvados.org/arvados.git/lib/cmd"
"github.com/mattn/go-isatty"
@@
-21,23
+27,39
@@
var (
"ref2genome": &ref2genome{},
"vcf2fasta": &vcf2fasta{},
"import": &importer{},
"ref2genome": &ref2genome{},
"vcf2fasta": &vcf2fasta{},
"import": &importer{},
+ "annotate": &annotatecmd{},
"export": &exporter{},
"export-numpy": &exportNumpy{},
"export": &exporter{},
"export-numpy": &exportNumpy{},
- "filter": &filterer{},
+ "flake": &flakecmd{},
+ "slice": &slicecmd{},
+ "slice-numpy": &sliceNumpy{},
+ "anno2vcf": &anno2vcf{},
+ "numpy-comvar": &numpyComVar{},
+ "filter": &filtercmd{},
"build-docker-image": &buildDockerImage{},
"pca-go": &goPCA{},
"pca-py": &pythonPCA{},
"plot": &pythonPlot{},
"diff-fasta": &diffFasta{},
"build-docker-image": &buildDockerImage{},
"pca-go": &goPCA{},
"pca-py": &pythonPCA{},
"plot": &pythonPlot{},
"diff-fasta": &diffFasta{},
- "stats": &stats{},
+ "stats": &stats
cmd
{},
"merge": &merger{},
"merge": &merger{},
+ "dumpgob": &dumpGob{},
})
)
})
)
-func main() {
+func init() {
+ if os.Getenv("GOGC") == "" {
+ debug.SetGCPercent(30)
+ }
+}
+
+func Main() {
if !isatty.IsTerminal(os.Stderr.Fd()) {
logrus.StandardLogger().Formatter = &logrus.TextFormatter{DisableTimestamp: true}
}
if !isatty.IsTerminal(os.Stderr.Fd()) {
logrus.StandardLogger().Formatter = &logrus.TextFormatter{DisableTimestamp: true}
}
+ if len(os.Args) >= 2 && !strings.HasSuffix(os.Args[1], "version") {
+ cmd.Version.RunCommand("lightning", nil, nil, os.Stderr, os.Stderr)
+ }
os.Exit(handler.RunCommand(os.Args[0], os.Args[1:], os.Stdin, os.Stdout, os.Stderr))
}
os.Exit(handler.RunCommand(os.Args[0], os.Args[1:], os.Stdin, os.Stdout, os.Stderr))
}
@@
-50,11
+72,11
@@
func (cmd *buildDockerImage) RunCommand(prog string, args []string, stdin io.Rea
return 1
}
defer os.RemoveAll(tmpdir)
return 1
}
defer os.RemoveAll(tmpdir)
- err = ioutil.WriteFile(tmpdir+"/Dockerfile", []byte(`FROM debian:
10
+ err = ioutil.WriteFile(tmpdir+"/Dockerfile", []byte(`FROM debian:
bullseye
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get dist-upgrade -y && \
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y --no-install-recommends bcftools bedtools samtools python2 python3-sklearn python3-matplotlib && \
+ apt-get install -y --no-install-recommends bcftools bedtools samtools python2 python3-sklearn python3-matplotlib
ca-certificates
&& \
apt-get clean
`), 0644)
if err != nil {
apt-get clean
`), 0644)
if err != nil {