Skip to content

Commit

Permalink
add fig config, Dockerfile and Dockerfile to run kgsGtp close by
Browse files Browse the repository at this point in the history
  • Loading branch information
lefant committed Sep 6, 2014
1 parent e77663b commit 2f7a3e9
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:14.04
MAINTAINER Fabian Linzberger <e@lefant.net>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update && \
apt-get install -y --no-install-recommends haskell-platform && \
apt-get clean

RUN cabal update

ADD src /root/src
ADD Setup.hs /root/Setup.hs
ADD kurt.cabal /root/kurt.cabal
ADD COPYRIGHT /root/COPYRIGHT

WORKDIR /root
RUN cabal install

RUN apt-get -y install netcat && apt-get clean

#ENV GHCRTS "-N"
ENTRYPOINT ["nc.traditional", "kgsGtp_1", "12345", "-e", "/.cabal/bin/kurt"]
12 changes: 12 additions & 0 deletions fig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kgsGtp:
build: kgsGtp
command: mode=custom opponent=lefant gameNotes="for lefant"
#command: mode=custom opponent=lefant gameNotes="9x9 only, about 25k on a good day"
#command: mode=tournament
environment:
NAME:
PASSWORD:
kurt:
build: .
links:
- kgsGtp
19 changes: 19 additions & 0 deletions kgsGtp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:14.04
MAINTAINER Fabian Linzberger <e@lefant.net>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update && \
apt-get install -y --no-install-recommends openjdk-7-jre-headless && \
apt-get clean

ADD http://files.gokgs.com/javaBin/kgsGtp-3.5.11.tar.gz /root/kgsGtp-3.5.11.tar.gz
WORKDIR /root
RUN tar xvzf kgsGtp-3.5.11.tar.gz

ADD kgsGtp.conf /root/kgsGtp.conf
ADD kgsGtp.sh /root/kgsGtp.sh

EXPOSE 12345
CMD ["mode=custom"]
ENTRYPOINT ["/root/kgsGtp.sh"]
7 changes: 7 additions & 0 deletions kgsGtp/kgsGtp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
reconnect=t
engine.port=12345
room=Computer Go
verbose=t
rules=chinese
rules.boardSize=9
rules.time=5:00
3 changes: 3 additions & 0 deletions kgsGtp/kgsGtp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -e

java -jar kgsGtp-3.5.11/kgsGtp.jar kgsGtp.conf name=$NAME password=$PASSWORD "$@"

0 comments on commit 2f7a3e9

Please sign in to comment.