-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-experiment
More file actions
41 lines (34 loc) · 1.49 KB
/
Copy pathDockerfile-experiment
File metadata and controls
41 lines (34 loc) · 1.49 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
# builds an image for running the memory-dynamics experiment
# Use Dockerfile-analyses to build an environment for reproducing the analyses.
#
# Note: the latest release of psiTurk (v3.3.1, October 2022) requires Python
# 3.9, which is EOL and no longer officially supported.
# experiment-requirements.txt pins all of psiTurk's dependencies to compatible
# versions to ensure the experiment still runs.
FROM python:3.9-slim-bookworm
LABEL maintainer="Paxton Fitzpatrick <Paxton.C.Fitzpatrick.GR@Dartmouth.edu>"
ARG DEBIAN_FRONTEND=noninteractive \
server_port=22363
ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8" \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_ROOT_USER_ACTION=ignore \
PYTHONDONTWRITEBYTECODE=1 \
PSITURK_GLOBAL_CONFIG_LOCATION="/mnt/exp"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN --mount=type=bind,source=docker/experiment-requirements.txt,target=/tmp/requirements.txt \
sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc && \
apt-get update && \
apt-get install -y --no-install-recommends \
# toolchain for building the handful of psiTurk dependencies with no
# prebuilt wheels for Python 3.9 (psutil, setproctitle, etc.)
gcc \
libc6-dev && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
# cleanup to reduce image size
apt-get purge -y --auto-remove gcc libc6-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf "$HOME/.cache/pip"
WORKDIR "/mnt/exp"
CMD ["/bin/bash"]