baxin commited on
Commit
c080baa
·
1 Parent(s): 754c606

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -14
Dockerfile CHANGED
@@ -1,19 +1,22 @@
1
- FROM python:3.7.15
 
2
 
3
- RUN apt-get update && \
4
- apt-get install -y git pkg-config libsystemd-dev
 
 
5
 
6
- # Set the working directory in the container to /app
7
- WORKDIR /app
 
 
 
8
 
9
- # Clone the Opentrons repository
10
- RUN git clone https://github.com/koji/opentrons.git
11
 
12
- # Change into the cloned directory
13
- WORKDIR /app/opentrons
14
 
15
- # Install dependencies and setup
16
- RUN make setup-py
17
-
18
- # Run the server
19
- RUN make -C robot-server dev
 
1
+ # Use the base image from kojikno/ot-robot-server
2
+ FROM kojikno/ot-robot-server:v1.2
3
 
4
+ # Set environment variables for pyenv
5
+ ENV HOME /root
6
+ ENV PYENV_ROOT $HOME/.pyenv
7
+ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
8
 
9
+ # Initialize pyenv
10
+ RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
11
+ RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
12
+ RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
13
+ RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
14
 
15
+ # Set the working directory
16
+ WORKDIR /root/opentrons
17
 
18
+ # Run make command in robot-server directory
19
+ RUN /bin/bash -c "source ~/.bashrc && make -C robot-server dev"
20
 
21
+ # Run chat UI
22
+ RUN /bin/bash -c "source ~/.bashrc && python app.py"