-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (23 loc) · 917 Bytes
/
Dockerfile
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
FROM python:3.10-slim
LABEL author="Terézia Slanináková"
LABEL email="slaninakova@mail.muni.cz"
LABEL website="https://disa.fi.muni.cz/complex-data-analysis/"
# Set the version of the image to use, default: cpu
ARG version=cpu
# Install linux packages
RUN apt-get update && apt-get install vim -y
# Install required python packages
COPY requirements-${version}.txt /tmp/
COPY requirements.txt /tmp/
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r /tmp/requirements-${version}.txt
# Create user, make it the owner of the home directory
RUN addgroup --gid 1000 user && adduser --gid 1000 --uid 1000 --disabled-password --gecos user user
USER root
RUN chown -R user:user /home/user && chmod -R 755 /home/user
# Copy the files from the host to the container and install the local package
COPY . /home/user
RUN pip install -e /home/user
USER user
WORKDIR /home/user
CMD ['/bin/sh', '-c', 'bash']