adding venv to prompt

This commit is contained in:
Salman Mohammadi
2025-07-02 15:27:42 +01:00
parent 8ae5a2311b
commit 8065fed126
4 changed files with 21 additions and 6 deletions

View File

@@ -22,9 +22,9 @@ RUN apt-get update \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
&& conda create -n "axolotl-py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
ENV PATH="/root/miniconda3/envs/axolotl-py${PYTHON_VERSION}/bin:${PATH}"
WORKDIR /workspace
@@ -37,3 +37,7 @@ RUN git lfs install --skip-repo && \
pip3 install awscli && \
# The base image ships with `pydantic==1.8.2` which is not working
pip3 install -U --no-cache-dir pydantic==1.10.10
# Initialize conda for bash shell to show environment in prompt
RUN conda init bash && \
echo "conda activate axolotl-py${PYTHON_VERSION}" >> ~/.bashrc

View File

@@ -22,9 +22,9 @@ RUN apt-get update \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
&& conda create -n "axolotl-py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
ENV PATH="/root/miniconda3/envs/axolotl-py${PYTHON_VERSION}/bin:${PATH}"
WORKDIR /workspace
@@ -36,3 +36,7 @@ RUN python3 -m pip install --upgrade pip && pip3 install packaging && \
RUN git lfs install --skip-repo && \
pip3 install awscli && \
pip3 install -U --no-cache-dir pydantic==2.10.6
# Initialize conda for bash shell to show environment in prompt
RUN conda init bash && \
echo "conda activate axolotl-py${PYTHON_VERSION}" >> ~/.bashrc

View File

@@ -22,9 +22,9 @@ RUN apt-get update \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
&& conda create -n "axolotl-py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
ENV PATH="/root/miniconda3/envs/axolotl-py${PYTHON_VERSION}/bin:${PATH}"
WORKDIR /workspace
@@ -37,3 +37,7 @@ RUN git lfs install --skip-repo && \
pip3 install awscli && \
# The base image ships with `pydantic==1.8.2` which is not working
pip3 install -U --no-cache-dir pydantic==1.10.10
# Initialize conda for bash shell to show environment in prompt
RUN conda init bash && \
echo "conda activate axolotl-py${PYTHON_VERSION}" >> ~/.bashrc

View File

@@ -34,3 +34,6 @@ RUN uv pip install packaging setuptools wheel psutil \
&& uv pip install --no-build-isolation "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@main" \
&& uv pip install "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@main" \
&& uv pip install awscli pydantic
# Configure shell to display current virtual environment
RUN echo 'export PS1="(axolotl-venv) \u@\h:\w\$ "' >> ~/.bashrc