Skip to content
Snippets Groups Projects
Dockerfile 841 B
Newer Older
Xuefeng Ding's avatar
Xuefeng Ding committed
# Use AlmaLinux 9 base image
FROM almalinux:9

# /vscode is the magic folder
WORKDIR /vscode

RUN dnf --best --assumeyes update \
    && dnf -y install \
    python3.11 \
    python3.11-pip \
    gcc \
    make \
    cmake \
    git \
    && dnf clean all

RUN python3.11 -m venv /vscode/.venv

COPY requirements.txt /vscode/requirements.txt
COPY requirements-dev.txt /vscode/requirements-dev.txt
COPY .devcontainer/install_zsh.sh /vscode/install_zsh.sh

RUN /vscode/install_zsh.sh

RUN echo 'source /vscode/.venv/bin/activate' > ~/.bash_profile \
    && source /vscode/.venv/bin/activate \
    && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
    && pip install --upgrade pip \
    && pip install -r requirements-dev.txt


RUN rm -rf /vscode/requirements.txt /vscode/requirements-dev.txt /vscode/install_zsh.sh