# How can I upload a python code to my m500 with voxl mavsdk

Source: https://forum.modalai.com/topic/1889/how-can-i-upload-a-python-code-to-my-m500-with-voxl-mavsdk
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2023-03-01 14:35:56 UTC by José Quintanilla
Replies: 9 · Views: 831

## José Quintanilla · 2023-03-01 14:35:56 UTC

So I recently was able to use the sdk function on my m500 drone, and I want to modify one of the codes in my computer and then try it on my drone, but I don't really know how to upload the new code to the docker image, Does anyone know how to do it?

## Reply by tom (ModalAI staff) · 2023-03-03 00:31:39 UTC

@José-Quintanilla You'll want to mount whatever directory or files you want inside the container using something like: `docker run -v /host/directory:/container/directory`

## Reply by tom (ModalAI staff) · 2023-03-03 00:31:56 UTC

@José-Quintanilla https://docs.docker.com/storage/bind-mounts/

## Reply by José Quintanilla · 2023-03-03 01:15:59 UTC (in reply to tom)

@tom and I can do that from my computer using the adb shell? Im kinda new at this

## Reply by tom (ModalAI staff) · 2023-03-03 01:18:47 UTC

@José-Quintanilla You'd just modify this command that you're using: `docker run -it --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash`

You can push your script to the VOXL with `adb push FILE_NAME PATH_ON_VOXL` and then add the `-v` option to the docker command to point to where the script lives on VOXL and where you'd like it to live inside the docker container

## Reply by José Quintanilla · 2023-03-03 01:38:10 UTC

I still don't get it

## Reply by José Quintanilla · 2023-03-03 01:40:43 UTC

so instead of docker run -it --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash it woul be: docker run -v --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash?

## Reply by tom (ModalAI staff) · 2023-03-03 18:10:02 UTC

@José-Quintanilla No, look at the doc page I sent, you have to specify the location of the file on VOXL and well as where you'd like it to mount inside the container. This is a very common docker use-case and there is plenty of documentation out there to show you how to do it.

## Reply by José Quintanilla · 2023-03-06 21:37:02 UTC

Hi tom, do you have another source I can look up? I still can't seem to understand how to do it

## Reply by tom (ModalAI staff) · 2023-03-06 21:38:56 UTC

@José-Quintanilla https://www.baeldung.com/ops/docker-mount-single-file-in-volume
