Skip to content

Commit 4d5f4ba

Browse files
Merge pull request #7 from PDBe-KB/include-config-in-dockerfile
Include config files in Dockerfile
2 parents b65bb98 + 8ed7562 commit 4d5f4ba

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ example_data/*
33
mmdb2.a
44
srs.a
55
ssm.a
6-
setup/*
76
compile_mac.sh
87
README.md

Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ RUN /usr/src/pisa/compile.sh
2020

2121
FROM ubuntu:20.04
2222

23-
COPY --from=build /usr/src/pisa/build /usr/share/pisa
23+
# Copy binary from build
24+
COPY --from=build /usr/src/pisa/build /usr/bin/pisa
2425

25-
ENV PATH=$PATH:/usr/share/pisa
26+
# Copy config files
27+
COPY setup /usr/share/pisa/setup
28+
ENV PISA_CONFIG_DIR=/usr/share/pisa/setup
29+
30+
# Update constants in main config file
31+
ENV DATA_DIR=/data
32+
RUN mkdir -p ${DATA_DIR}
33+
34+
RUN sed -i "s|path_dataroot|${DATA_DIR}|g" ${PISA_CONFIG_DIR}/pisa_cfg_tmp && \
35+
sed -i "s|path_to_setup/srs|${PISA_CONFIG_DIR}/srs|g" ${PISA_CONFIG_DIR}/pisa_cfg_tmp && \
36+
sed -i "s|path_to_setup/molref|${PISA_CONFIG_DIR}/molref|g" ${PISA_CONFIG_DIR}/pisa_cfg_tmp && \
37+
sed -i "s|path_to_setup/pisastore|${PISA_CONFIG_DIR}/pisastore|g" ${PISA_CONFIG_DIR}/pisa_cfg_tmp && \
38+
sed -i "/pisa_/d" ${PISA_CONFIG_DIR}/pisa_cfg_tmp
39+
40+
ENV PATH=$PATH:/usr/bin/pisa

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ A Docker image is available for PISA. To run PISA in Docker, use the following c
189189
``` bash
190190

191191
# Run the analysis
192-
docker run -v $PWD:/data pdbegroup/pisa pisa test-session -analyse /data/example_data/6gve.cif /data/pisa_cfg
192+
docker run -v $PWD:/data pdbegroup/pisa pisa test-session -analyse /data/example_data/6gve.cif /usr/share/pisa/setup/pisa_cfg_tmp
193193

194194
# Get the interfaces
195-
docker run -v $PWD:/data pdbegroup/pisa pisa test-session -xml interface /data/pisa_cfg
195+
docker run -v $PWD:/data pdbegroup/pisa pisa test-session -xml interface /usr/share/pisa/setup/pisa_cfg_tmp
196196

197197
```
198198

0 commit comments

Comments
 (0)