Repository navigation
Expand file tree
/
Copy pathDockerfile.cptac
More file actions
executable file
·47 lines (39 loc) · 1.64 KB
/
Copy pathDockerfile.cptac
File metadata and controls
executable file
·47 lines (39 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3.11-slim
# Keep scratch files OFF the /tmp bind mount.
#
# build_all.py bind-mounts the host's local/ directory at /tmp in every
# container. Python 3.14 changed the default multiprocessing start method on
# Linux from "fork" to "forkserver", which opens a Unix domain socket under
# tempfile.gettempdir() -- i.e. /tmp, i.e. the bind mount. Docker's macOS file
# sharing does not support chmod() on a socket there, so every Pool worker
# fails with:
#
# OSError: [Errno 22] Invalid argument: '/tmp/pymp-XXXX/sock-YYYY'
#
# This broke build_drug_desc.py and fit_curve.py on 2026-09-03, each at the end
# of a multi-hour step, and it is deterministic so retries do not help.
#
# TMPDIR only affects tempfile.gettempdir() (Python) and tempdir() (R). Explicit
# /tmp/<name> paths -- which is how every build OUTPUT is written -- still land
# on the bind mount as before. Verified.
RUN mkdir -p /opt/mp_tmp
ENV TMPDIR=/opt/mp_tmp
#ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update --allow-insecure-repositories
RUN apt-get install -y --allow-unauthenticated --fix-missing gcc-12 build-essential libpq-dev python3-venv
RUN python3 -m venv /opt/venv
RUN /opt/venv/bin/pip3 install --upgrade pip
ENV PATH="/opt/venv/bin:$PATH"
ENV PYTHONPATH "${PYTHONPATH}:/tmp"
ENV PYTHONPATH "${PYTHONPATH}:/app"
WORKDIR /app
# installing python libraries
COPY coderbuild/cptac/requirements.txt .
RUN /opt/venv/bin/pip3 install -r requirements.txt
COPY coderbuild/cptac/*.py ./
COPY coderbuild/cptac/*sh ./
# Set MPLCONFIGDIR to a writable directory
ENV MPLCONFIGDIR=/app/tmp/matplotlib
RUN mkdir -p /app/tmp/matplotlib
VOLUME ["/tmp"]
#ENTRYPOINT ["python3","getCptacData.py"]