Skip to content

Commit

Permalink
remove conda env creation
Browse files Browse the repository at this point in the history
  • Loading branch information
yika-luo committed Oct 31, 2024
1 parent dda6a3f commit 61f3791
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
28 changes: 9 additions & 19 deletions Dockerfile_k8s
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && \
apt install git gcc rsync sudo patch openssh-server pciutils nano fuse socat netcat curl -y && \
rm -rf /var/lib/apt/lists/* && \
apt remove -y python3
apt remove -y python3 && \
conda init

# Setup SSH and generate hostkeys
RUN mkdir -p /var/run/sshd && \
Expand All @@ -34,26 +35,15 @@ WORKDIR /home/sky

SHELL ["/bin/bash", "-c"]

# Install python system packages
RUN curl -o Miniconda3-Linux-x86_64.sh https://repo.anaconda.com/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh && \
bash Miniconda3-Linux-x86_64.sh -b && \
eval "$(~/miniconda3/bin/conda shell.bash hook)" && \
conda init && conda config --set auto_activate_base true && conda activate base && \
grep "# >>> conda initialize >>>" ~/.bashrc || { conda init && source ~/.bashrc; } && \
rm Miniconda3-Linux-x86_64.sh && \
conda create -y -n skypilot-runtime python=3.10 && \
conda activate skypilot-runtime && \
export PIP_DISABLE_PIP_VERSION_CHECK=1 && \
# Install skypilot dependencies
RUN conda init && export PIP_DISABLE_PIP_VERSION_CHECK=1 && \
python3 -m venv ~/skypilot-runtime && \
PYTHON_EXEC=$(echo ~/skypilot-runtime)/bin/python && \
$PYTHON_EXEC -m pip install 'skypilot-nightly[remote,docker,kubernetes]'

# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" && \
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# Add /home/sky/.local/bin/ to PATH
RUN echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
$PYTHON_EXEC -m pip install 'skypilot-nightly[remote,kubernetes]' 'ray[default]==2.9.3' 'pycryptodome>=3.12.0' && \
$PYTHON_EXEC -m pip uninstall skypilot-nightly -y && \
curl -LO "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" && \
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc

# Copy SkyPilot code base. This is required for the ssh jump pod to find the
# lifecycle management scripts
Expand Down
15 changes: 5 additions & 10 deletions Dockerfile_k8s_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,14 @@ RUN curl -o Miniconda3-Linux-x86_64.sh https://repo.anaconda.com/miniconda/Minic
conda init && conda config --set auto_activate_base true && conda activate base && \
grep "# >>> conda initialize >>>" ~/.bashrc || { conda init && source ~/.bashrc; } && \
rm Miniconda3-Linux-x86_64.sh && \
conda create -y -n skypilot-runtime python=3.10 && \
conda activate skypilot-runtime && \
export PIP_DISABLE_PIP_VERSION_CHECK=1 && \
python3 -m venv ~/skypilot-runtime && \
PYTHON_EXEC=$(echo ~/skypilot-runtime)/bin/python && \
$PYTHON_EXEC -m pip install 'skypilot-nightly[remote,docker,kubernetes]' && \
$PYTHON_EXEC -m pip uninstall skypilot-nightly -y

RUN curl -LO "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" && \
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# Add /home/sky/.local/bin/ to PATH
RUN echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
$PYTHON_EXEC -m pip install 'skypilot-nightly[remote,kubernetes]' 'ray[default]==2.9.3' 'pycryptodome>=3.12.0' && \
$PYTHON_EXEC -m pip uninstall skypilot-nightly -y && \
curl -LO "https://dl.k8s.io/release/v1.28.11/bin/linux/amd64/kubectl" && \
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc

# Copy SkyPilot code base. This is required for the ssh jump pod to find the
# lifecycle management scripts
Expand Down
1 change: 0 additions & 1 deletion sky/setup_files/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def parse_readme(readme: str) -> str:
# <= 3.13 may encounter https://github.com/ultralytics/yolov5/issues/414
'pyyaml > 3.13, != 5.4.*',
'requests',
'pycryptodome >= 3.12.0',
]

local_ray = [
Expand Down

0 comments on commit 61f3791

Please sign in to comment.