Skip to content

Commit

Permalink
refactor<dockers> change file move in all docker images to adopt with…
Browse files Browse the repository at this point in the history
… new files
  • Loading branch information
Ahelsamahy committed Oct 11, 2024
1 parent 38ffdfe commit 1f826e3
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 53 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import multiprocessing
from six.moves.configparser import SafeConfigParser

from .app import TeleopApplication
from ..jetson_runtime.teleop.teleop.app import TeleopApplication
from io import open


Expand Down
File renamed without changes.
12 changes: 0 additions & 12 deletions jetson_runtime/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ services:
volumes:
- volume_ftpd_config:/etc/pureftpd:rw
- volume_byodr_sessions:/home/ftpuser:rw
rosnode:
cpuset: '0'
build:
context: .
dockerfile: rosnode/Dockerfile
restart: always
command: ['python3', 'app.py', '--name', 'rosnode']
network_mode: host
stop_signal: SIGKILL
volumes:
- volume_byodr_sockets:/byodr:rw
- volume_byodr_config:/config:ro
mongodb:
cpuset: '0'
build:
Expand Down
20 changes: 8 additions & 12 deletions jetson_runtime/following/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ RUN \

RUN pip3 install --upgrade pyzmq lap simple-pid

# Copy your application files
COPY ./common/ /common/
COPY ./following/ /app/
WORKDIR /app

ENV PYTHONPATH "/app:/common:${PYTHONPATH}"

# Should use this one in the future. to keep the imports also desciverable by the local env. Will need to add `common.` at the beginning of each byodr import
# COPY ./common/ /app/common/
# COPY ./following/ /app/following/
# WORKDIR /app/following
# ENV PYTHONPATH "/app:${PYTHONPATH}"
# Copy application files
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/JETSON_specific/ /app/BYODR_utils/JETSON_specific/

COPY ./following /app/following
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/following


# Command to run your application
Expand Down
4 changes: 2 additions & 2 deletions jetson_runtime/httpd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN npm install -g mapport
#The entry point for the Docker container is set to run haproxy with a configuration file /app/haproxy.conf.
#This means that when the container starts, it will initiate HAProxy with the given configuration in haproxy.conf.

COPY ./httpd app/
WORKDIR /app
COPY ./httpd app/httpd
WORKDIR /app/httpd

CMD ["/usr/sbin/haproxy", "-f", "/app/haproxy.conf"]
15 changes: 9 additions & 6 deletions jetson_runtime/inference/runtime-cp36-jp441.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM centipede2donald/nvidia-jetson:jp441-nano-cp36-oxrt-3

COPY ./common common/
COPY ./inference app/
WORKDIR /app
# Copy application files
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/JETSON_specific/ /app/BYODR_utils/JETSON_specific/

COPY ./build/*.onnx /models/
COPY ./build/*.ini /models/
COPY ./build/ /app/models/

COPY ./inference /app/inference
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/inference

ENV PYTHONPATH "${PYTHONPATH}:/common"
4 changes: 2 additions & 2 deletions jetson_runtime/mongodb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ENV MONGO_INITDB_ROOT_PASSWORD=robot
EXPOSE 27017

# Copy the Python script and any other necessary files into the container
COPY ./mongodb /app/
WORKDIR /app
COPY ./mongodb /app/mongodb
WORKDIR /app/mongodb


# Set the entrypoint to run the Python script that manages MongoDB
Expand Down
11 changes: 7 additions & 4 deletions jetson_runtime/pilot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ RUN pip3 install simple-pid Jetson.GPIO
RUN pip3 install "pyusb==1.0.2"
RUN pip3 install "tornado==6.1"

COPY ./common common/
COPY ./pilot app/
WORKDIR /app
# Copy application files
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/JETSON_specific/ /app/BYODR_utils/JETSON_specific/

ENV PYTHONPATH "${PYTHONPATH}:/common"
COPY ./pilot app/pilot
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/pilot

CMD ["python3", "app.py"]
18 changes: 13 additions & 5 deletions jetson_runtime/teleop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@ RUN pip3 install pymongo tornado folium Flask flask_socketio paramiko user-agent
# from cryptography.x509 import load_der_x509_certificate as _load_der_x509_certificate
ENV PYTHONWARNINGS "ignore::UserWarning"

COPY ./common common/
COPY ./teleop app/
WORKDIR /app

EXPOSE 8080 5000

ENV PYTHONPATH "${PYTHONPATH}:/common"

# Copy application files
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/JETSON_specific/ /app/BYODR_utils/JETSON_specific/

COPY ./teleop /app/teleop
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/teleop


# # Command to run your application
# CMD ["python3", "app.py"]
14 changes: 10 additions & 4 deletions jetson_runtime/vehicles/rover/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ FROM mwlvdev/jetson-nano-ubuntu:focal-cp310-GST
RUN pip3 install --upgrade pip && \
pip3 install pysnmp==4.4.12 pyasn1==0.4.8

COPY ./common common/
COPY ./vehicles/rover app/
WORKDIR /app
ENV PYTHONPATH "${PYTHONPATH}:/common"

COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/JETSON_specific/ /app/BYODR_utils/JETSON_specific/

COPY ./vehicles/rover app/vehicles/rover
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/vehicles/rover


CMD ["python3.10", "app.py"]
4 changes: 2 additions & 2 deletions pi4_runtime/servos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ RUN git clone https://github.com/LiamBindle/PyVESC.git \
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/PI_specific/ /app/BYODR_utils/PI_specific/

COPY ./ras /app/ras
COPY ./servos /app/servos
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/ras
WORKDIR /app/servos

CMD ["python", "servos.py"]
11 changes: 8 additions & 3 deletions pi4_runtime/stream/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM centipede2donald/raspbian-stretch:gst-omx-rpi-0.50.2


COPY ./ app/
WORKDIR /app
# Copy application files
COPY ./BYODR_utils/common/ /app/BYODR_utils/common/
COPY ./BYODR_utils/PI_specific/ /app/BYODR_utils/PI_specific/

COPY ./stream /app/stream
ENV PYTHONPATH "/app:${PYTHONPATH}"

WORKDIR /app/stream

ENV PYTHONPATH "${PYTHONPATH}:/common"

CMD ["sleep", "infinity"]

0 comments on commit 1f826e3

Please sign in to comment.