Skip to content

Commit 9956b4a

Browse files
committed
Introduce virtualenv in Docker image
1 parent 1ff86b7 commit 9956b4a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ ENV PATH="/root/.local/bin:${PATH}"
1010

1111

1212
RUN apt-get update && apt-get install -y \
13-
ca-certificates python3 python3-pip libgl1-mesa-dev libglib2.0-0 libsm6 libxrender1 libxext6 nano vim htop && \
13+
ca-certificates python3 python3-pip python3-venv libgl1-mesa-dev libglib2.0-0 libsm6 libxrender1 libxext6 nano vim htop && \
1414
rm -rf /var/lib/apt/lists/*
1515

1616
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
1717
RUN update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 1
1818

19+
ENV VIRTUAL_ENV=/tmp/superannotatesdk
20+
RUN python -m venv ${VIRTUAL_ENV}
21+
ENV PATH="${VIRTUAL_ENV}/bin:$PATH"
22+
1923
RUN apt-get install -y build-essential && \
20-
pip install --no-cache-dir shapely && \
21-
pip install --no-cache-dir ${PIP_FLAGS} superannotate && \
22-
apt-get remove -y build-essential && \
23-
apt-get -y autoremove && \
24-
rm -rf /root/.cache/pip && \
25-
rm -rf /var/lib/apt/lists/*
24+
pip install --no-cache-dir shapely && \
25+
pip install --no-cache-dir ${PIP_FLAGS} superannotate && \
26+
apt-get remove -y build-essential && \
27+
apt-get -y autoremove && \
28+
rm -rf /root/.cache/pip && \
29+
rm -rf /var/lib/apt/lists/*
2630

2731
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)