-
-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 800 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (30 loc) · 800 Bytes
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
FROM python:3.13.0
ARG DEBIAN_FRONTEND=noninteractive
ARG USERNAME=dev-user
ARG GROUPNAME=dev-user
ARG UID=1000
ARG GID=1000
ARG WORKDIR=/home/dev-user/workspace
RUN groupadd -g $GID $GROUPNAME && \
useradd -m -s /bin/bash -u $UID -g $GID $USERNAME
RUN apt update && apt install -y \
git \
vim \
wget \
sudo \
graphviz \
graphviz-dev \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p $WORKDIR
RUN chown -R $UID:$GID $WORKDIR
USER $USERNAME
WORKDIR $WORKDIR
RUN python -m pip install --upgrade --user pip
RUN python -m pip install --upgrade --user setuptools
# Install do-mpc + CasADi
RUN pip install --no-cache-dir \
casadi>=3.6.5 \
do-mpc>=4.6.4
COPY requirements.txt $WORKDIR
RUN python -m pip install --user -r requirements.txt