File: Dockerfile.pip

package info (click to toggle)
python-trame 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 101,620 kB
  • sloc: python: 13,515; sh: 183; javascript: 93; makefile: 7
file content (38 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download | duplicates (2)
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
ARG BASE_IMAGE=trame-common
FROM ${BASE_IMAGE}

ARG PYTHON_VERSION=3.9

RUN apt-get update && \
    apt-get install -y \
      python${PYTHON_VERSION} \
      # python-distutils is required to install pip
      python${PYTHON_VERSION}-distutils \
      # python-is-python3 creates a symlink for python to python3
      python-is-python3 \
      # For creating virtual environments
      python${PYTHON_VERSION}-venv && \
    rm -rf /var/lib/apt/lists/*

# Set python3 to python3.x (otherwise, it will be python3.8)
RUN if [ "$PYTHON_VERSION" != "3" ] ; then update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 ;fi

# Never use a cache directory for pip, both here in this Dockerfile
# and when we run the container.
ENV PIP_NO_CACHE_DIR=1

# Install and upgrade pip
RUN wget -q -O- https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} && \
    pip install -U pip

# Install setup dependencies
RUN pip install PyYAML wheel

# Copy the pip scripts into place
COPY scripts/pip/* /opt/trame/

# Set venv paths
ENV TRAME_VENV=/deploy/server/venv
ENV PV_VENV=$TRAME_VENV
ENV VTK_VENV=$TRAME_VENV
ENV TRAME_PYTHON=${PYTHON_VERSION}