Skip to content

Instantly share code, notes, and snippets.

@parmentf
Last active December 4, 2015 23:58
Show Gist options
  • Save parmentf/14387ba9fd0ab7604093 to your computer and use it in GitHub Desktop.
Save parmentf/14387ba9fd0ab7604093 to your computer and use it in GitHub Desktop.
Dockerfile for DILIB v0.6

DILIB

A first try to write Dockerfiles for DILIB.

I followed these instructions.

bash

At least, this allows to connect and have access to DILIB's commands:

$ docker run --name dilib -ti --rm parmentf/dilib:v0.6 /bin/bash

Command

Or you can directly run a commande (like SgmlIndent):

$ docker run --name dilib -ti --rm parmentf/dilib:v0.6 SgmlIndent
<a><b>1</b></a>
<a>
  <b>1</b>
</a>

Alias

Or you can create an alias:

$ alias dilib="docker run -ti --rm parmentf/dilib:v0.6 "

And use it more easily:

$ dilib SgmlIndent
<a>1</a>
<a>
  1
</a>

List of commands

To get the list of DILIB's commands:

$ dilib ls /root/Dilib/v0.6/Main/bin
AssocBuildUsual               IstexGetCorpusSize
AssocFastFromIndex            IstexModsToSxml
AssocFastWithIndex            IstexModsToTei
BufferSelect                  IstexResultSelect
BufferSelectFirstByKey        IstexToSxml
CcsdExplorDataShells          JsonToSxml
CcsdExplorSiteHtmlPhp         MarcXmlFromIso2709
CcsdExplorSiteShell           MediaWikiCleanTable
CcsdHal2CorpusStep1           MediaWikiExtractSources
CcsdHal2CorpusStep2           MediaWikiGeoStatMap
CcsdHalAffiliationSetPays     MediaWikiImportClean
CcsdHalTei2Corpus             MediaWikiTable2Sxml
CharSetTr                     MediaWikiTable2SxmlRowCol
DamCat                        MediaWikiTable2SxmlStep1
DamGetPath                    MediaWikiTable2SxmlStep2
DamHfdBuild                   MediaWikiTableTransformCol
DamHfdSelect                  MiniBibFromEd
DateCurationClass             Nlm2Sxml
DilibHead                     NlmCurationCountry
DilibMakeMan.sh               NlmMedlineAffiliationSetPays
DilibManPreProc               NlmMedlineExplorDataShells
DilibTail                     NlmMedlineExplorSiteHtmlPhp
EurovocCreateConceptTable     NlmMedlineExplorSiteShell
EurovocMultiLingTabFromSxml   NlmNcbiExplorDataShells
ExplorAnalysis2Merge          NlmNcbiExplorSiteHtmlPhp
ExplorAreaDataCreate          NlmNcbiExplorSiteShell
ExplorAreaDataTrainingCreate  NlmPmc2CorpusTei
ExplorAreaDataUpdate          NlmPmc2Sxml
ExplorAreaInit                NlmPmc2Wicri
ExplorAreaUpdate              NlmPmcAffiliationSetPays
ExplorExplorSiteShell         NlmPmcExplorDataShells
ExplorGenerAreaPages          NlmPmcExplorSiteHtmlPhp
ExplorGenerParamStep1         NlmPmcExplorSiteShell
ExplorGenerParamStep2         NlmPmcResultSelect
ExplorGenerShell              NlmPubMed2CorpusTei
ExplorGenerSite               NlmPubMed2SxmlStep1
ExplorGenerSiteParam          NlmPubMed2SxmlStep2
ExplorGenerSiteShell          NlmPubMedExplorCorpus
ExplorMainExplorDataShells    NlmPubMedFlashCorpus
ExplorMainExplorSiteHtmlPhp   NlmPubMedGetCorpus
ExplorMainExplorSiteShell     NlmPubMedGetCorpusSize
ExplorParamDictFromWiki       NlmPubMedResultSelect
ExplorParamFromRowCol         PascalFromIlib
ExplorParamFromWiki           PascalServer2xml
ExplorParamFromWikiTable      PascalSgml2utf8
ExplorZoomDataShells          PascalToMiniBibStruct
ExplorZoomSiteHtmlPhp         RegExpSelect
ExplorZoomSiteShell           SgmlFast
GettyBhaExplorDataShells      SgmlIndent
GettyBhaExplorSiteShells      SgmlReplace
GettyExplorSiteShells         SgmlSelect
HcsSxmlRecordPutKey           SgmlSetAtt
HfdBuild                      SgmlStreamExtract
HfdCat                        SgmlWordSplitUsual
HfdGetPath                    SmwCsvToSxml
HfdIndexBuildHid              SsiParser
HfdIndexBuildRec              StrDictFromStream
HfdIndexSelect                StrDictKey
HfdSelect                     StrDictMerge
HfdStoreFile                  StrDictSelect
HfdSxmlRecordPutKey           StrSearchKey
HistoBuildRec                 SxPathTestOnePath
IndexAssocCosinus             SxmlCut
IndexBuildHid                 SxmlFindText
IndexBuildRec                 SxmlFromXmlList
IndexBuildUsual               SxmlGrouping
IndexClusterFromAssoc         SxmlIndent
IndexClusterName              SxmlRecordPutKey
IndexClusterSetFromHisto      SxmlSelect
IndexFastBuildRec             SxmlUnIndent
IndexHistoBuilder             TeiAddKeywordsTermsFromTableRbid
IndexSelect                   TeiCurationPers
InistAffiliationSetCountry    TeiGeoSvgFromWiki
InistBhaCurPar                TeiKeywordsFromTable
InistBhaExplorDataShells      TeiListBiblio2MediaWikiTable
InistBhaExplorSiteHtmlPhp     TeiPutLinkByRbid
InistBhaExplorSiteShell       TeiPutRefToIdno
InistBhaKwd2Wicri             TeiRejectOnIdno
InistCurationCountry          TeiRejectOnKeywords
InistExodic2Tei               TeiTableCityFromWiki
InistExplorComputeParam       TeiTableOrgFromWiki
InistExplorDataShells         TeiTablePersFromWiki
InistExplorInit               TeiTableRegionFromWiki
InistExplorParam              TeiTableTermsFromGroup
InistExplorSiteHtmlPhp        TeiTableTermsFromWiki
InistExplorSiteShell          UsMarcToTei
InistIlib2Sxml                Utf8FromDecimalEntity
InistMergeBiblioFromIdx       Utf8FromHexEntity
InistPair2Tei                 Utf8FromIsoLat1Entity
InistServer2Sxml              Utf8IndexPhpFilter
InistSgml2utf8                Utf8SplitWordUsual
Iso2709SplitFile              Utf8StopWordsDictFromWiki
Iso2709ToSxml                 Utf8ToLc
IstexAffiliationSetPays       WicriBiblioCsv2CorpusTei
IstexCatXml                   WicriBiblioExplorDataShells
IstexCleanFullText            WicriBiblioExplorSite
IstexCurationCountry          WicriExplorSiteShell
IstexExplorCorpus             WicriGetPage
IstexExplorDataShells         WicriTableOrgFromWiki
IstexExplorSiteHtmlPhp        WicriTableRegionFromWiki
IstexExplorSiteShell          XmlCut
IstexFlashCorpus              XmlRecordHead
IstexGetCorpus                XmlRecordRange
IstexGetCorpusById            XmlRecordTail
FROM buildpack-deps:trusty
MAINTAINER François PARMENTIER <francois.parmentier@gmail.com>
ENV DILIB_BOTTOM=/root/Dilib
RUN mkdir -p $DILIB_BOTTOM/v0.6/Main && \
mkdir -p $DILIB_BOTTOM/tmp && \
apt-get update && apt-get install -y \
flex
ADD Import.tar.gz $DILIB_BOTTOM/v0.6/
RUN cp $DILIB_BOTTOM/v0.6/Import/DilibMake/Templates/UbuntoMain/MakeDef.mk $DILIB_BOTTOM/v0.6/Main/ \
&& cat $DILIB_BOTTOM/v0.6/Import/DilibMake/Templates/UbuntoMain/init.sh \
| sed -e 's|Dilib/V0.5.92|Dilib/v0.6|g' > $DILIB_BOTTOM/v0.6/Main/init.sh \
&& . $DILIB_BOTTOM/v0.6/Main/init.sh \
&& . $DILIB_ROOT/Import/DilibMake/DilibCreate.sh \
&& rm $DILIB_TARGET/MakeDir/* \
&& echo ". $DILIB_BOTTOM/v0.6/Main/init.sh" >> /root/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment