Mercurial > repos > galaxytrakr > mitokmer
comparison Dockerfile @ 2:dd206296acbf draft
planemo upload commit 83cba09882dc583100b39b69b41cf791e4efb55a
| author | galaxytrakr |
|---|---|
| date | Mon, 14 Sep 2026 19:47:05 +0000 |
| parents | adc887a1a6de |
| children | ecf96ad08611 |
comparison
equal
deleted
inserted
replaced
| 1:e6b5e7a0d7e7 | 2:dd206296acbf |
|---|---|
| 35 # Clone mitokmer2 source code from GitHub | 35 # Clone mitokmer2 source code from GitHub |
| 36 RUN git clone https://github.com/mmammel8/mitokmer2.git /opt/mitokmer2 | 36 RUN git clone https://github.com/mmammel8/mitokmer2.git /opt/mitokmer2 |
| 37 | 37 |
| 38 WORKDIR /opt/mitokmer2 | 38 WORKDIR /opt/mitokmer2 |
| 39 | 39 |
| 40 # Compile the C++ read-screening program | 40 # Compile kmer_read_1.cpp -> kmerread7 |
| 41 # kmer_read_1.cpp -> kmerread | 41 # kmer_read_m7.py calls ./kmerread7 as a subprocess |
| 42 RUN g++ -O3 kmer_read_1.cpp -o kmerread -lz && \ | 42 RUN g++ -O3 kmer_read_1.cpp -o kmerread7 -lz && \ |
| 43 chmod +x kmerread | 43 chmod +x kmerread7 |
| 44 | 44 |
| 45 # Install any Python requirements declared in the repo | 45 # Install any Python requirements declared in the repo |
| 46 RUN if [ -f requirements.txt ]; then \ | 46 RUN if [ -f requirements.txt ]; then \ |
| 47 pip install --no-cache-dir -r requirements.txt; \ | 47 pip install --no-cache-dir -r requirements.txt; \ |
| 48 fi | 48 fi |
| 62 python3.8-venv \ | 62 python3.8-venv \ |
| 63 python3.8-distutils \ | 63 python3.8-distutils \ |
| 64 && rm -rf /var/lib/apt/lists/* | 64 && rm -rf /var/lib/apt/lists/* |
| 65 | 65 |
| 66 # Copy compiled binary from build stage | 66 # Copy compiled binary from build stage |
| 67 COPY --from=build /opt/mitokmer2/kmerread /usr/local/bin/kmerread | 67 # kmerread7 is called by kmer_read_m7.py as ./kmerread7 so it |
| 68 # must be in the working directory at runtime; place it in both | |
| 69 # /usr/local/bin (for PATH) and /opt/mitokmer2 (for relative invocation) | |
| 70 COPY --from=build /opt/mitokmer2/kmerread7 /usr/local/bin/kmerread7 | |
| 71 COPY --from=build /opt/mitokmer2/kmerread7 /opt/mitokmer2/kmerread7 | |
| 68 | 72 |
| 69 # Copy Python scripts and supporting files from build stage | 73 # Copy Python scripts and supporting files from build stage |
| 70 COPY --from=build /opt/mitokmer2 /opt/mitokmer2 | 74 COPY --from=build /opt/mitokmer2 /opt/mitokmer2 |
| 71 | 75 |
| 72 # Copy Python virtual environment from build stage | 76 # Copy Python virtual environment from build stage |
| 73 # --copies in the build stage ensures no broken symlinks here | |
| 74 COPY --from=build /opt/venv /opt/venv | 77 COPY --from=build /opt/venv /opt/venv |
| 75 | 78 |
| 76 # Refresh the dynamic linker cache so zlib and other shared | 79 # Refresh the dynamic linker cache |
| 77 # libraries are found at runtime | |
| 78 RUN ldconfig || true | 80 RUN ldconfig || true |
| 79 | 81 |
| 80 # Ensure all users (including arbitrary Galaxy UIDs) can | 82 # Ensure all users (including arbitrary Galaxy UIDs) can |
| 81 # read and execute binaries, scripts, and the venv | 83 # read and execute binaries, scripts, and the venv |
| 82 RUN chmod a+rx /usr/local/bin/kmerread && \ | 84 RUN chmod a+rx /usr/local/bin/kmerread7 \ |
| 85 /opt/mitokmer2/kmerread7 && \ | |
| 83 chmod -R a+rX /opt/mitokmer2 && \ | 86 chmod -R a+rX /opt/mitokmer2 && \ |
| 84 chmod -R a+rX /opt/venv | 87 chmod -R a+rX /opt/venv |
| 85 | 88 |
| 86 # Runtime environment | 89 # Runtime environment |
| 87 ENV PATH="/opt/venv/bin:/opt/mitokmer2:/usr/local/bin:${PATH}" \ | 90 ENV PATH="/opt/venv/bin:/opt/mitokmer2:/usr/local/bin:${PATH}" \ |
