Spaces:
Runtime error
Runtime error
File size: 2,594 Bytes
3f3bdea 4ed8647 3f3bdea 8f22300 6751543 3f3bdea bee3f8a 3f3bdea 559dd4b 3f02336 3f3bdea 8eedbb6 bee3f8a adc64a9 2efee4c 3f3bdea c904019 7535686 bee3f8a 3f3bdea 3c5b772 30ea8d8 c904019 ac3964b 7535686 2a8e04e 1063c0e 7535686 1063c0e eabbf0d 1063c0e eabbf0d 16a9021 7535686 1063c0e 30ea8d8 16a9021 4afed9d 30ea8d8 ac3964b 15b0fa7 b1bfd37 ac3964b 4ed8647 170dee3 ac3964b 5231d74 a4cfbd3 2694bf1 02ceca9 6177b90 |
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# Use the base image from kojikno/ot-robot-server
FROM kojikno/ot-robot-server:v1.2
# Set environment variables for pyenv
ENV HOME /root
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# Initialize pyenv
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
RUN apt-get install libudev-dev
# Set the working directory
WORKDIR /root/opentrons
# EXPOSE 31950
RUN ls
# Run chat UI
# RUN /bin/bash -c "source ~/.bashrc && pyenv install 3.8.5"
# RUN /bin/bash -c "source ~/.bashrc && pyenv global 3.8.5"
# RUN /bin/bash -c "source ~/.bashrc && pip install gradio"
# RUN /bin/bash -c "source ~/.bashrc && python app.py"
# Run make command in robot-server directory
# RUN /bin/bash -c "source ~/.bashrc && make -C robot-server dev"
# RUN /bin/bash -c "source ~/.bashrc && make robot-server setup"
# Install yarn
# RUN /bin/bash -c "source ~/.bashrc && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo 'deb https://dl.yarnpkg.com/debian/ stable main' | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn"
# ENV NODE_VERSION 16.18.0
# # Install nvm with node and npm
# RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash \
# && . $NVM_DIR/nvm.sh \
# && nvm install $NODE_VERSION \
# && nvm alias default $NODE_VERSION \
# && nvm use default
# Set up PATH so that Node.js and npm can be found
# ENV PATH $NVM_DIR/versions/node/v16.18.0/bin:$PATH
# Install systemd
RUN apt-get update && apt-get install -y libsystemd-dev
# Run make command in robot-server directory
RUN /bin/bash -c "source ~/.bashrc && make -C robot-server setup"
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
# CMD ["pip" "install", "-r", "requirements"]
USER root
RUN pip install -r requirements.txt
#USER user
COPY --chown=root . $HOME/app
# CMD ["python", "main.py"]
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh
WORKDIR /root/opentrons
# ENTRYPOINT ["#!/bin/bash", "-c", "entrypoint.sh"]
ENTRYPOINT ["source", "entrypoint.sh"] |