Skip to content

Commit

Permalink
fix venv install packages
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwen committed Sep 21, 2024
1 parent 7a3b866 commit ceab6bb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions deepnote/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ RUN curl -fsSL https://bun.sh/install | bash \
# Set up PATH
ENV PATH="/root/work/bin:/root/work/bun/bin:${PATH}"

# Set working directory
WORKDIR /root/work

# Set up Python virtual environment
RUN python -m venv venv \
&& . venv/bin/activate \
&& rm -rf ~/.cache/pip
ENV PATH="/root/work/venv/bin:${PATH}"

# Copy requirements.txt and install Python dependencies
COPY requirements.txt /root/work/
RUN . /root/work/venv/bin/activate && pip install -r /root/work/requirements.txt
WORKDIR /root/work
COPY requirements.txt .
RUN . venv/bin/activate && pip install -r requirements.txt

# Set default shell to zsh
SHELL ["/bin/bash", "-c"]

# Activate virtual environment in zsh
# Activate virtual environment in bash
RUN echo "source /root/work/venv/bin/activate" >> ~/.bashrc

CMD ["/bin/bash"]
CMD ["/bin/bash"]

0 comments on commit ceab6bb

Please sign in to comment.