User Tools

Site Tools


gnu_radio_docker_benchmark_example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
gnu_radio_docker_benchmark_example [2021/02/04 10:15] aparisgnu_radio_docker_benchmark_example [2022/12/13 12:47] – [Submitting the task] lcardoso
Line 8: Line 8:
 ## Create your docker image ## Create your docker image
  
-Using docker, we will enable on your laptop an environment suitable for Cortexlab with gnuradio and needed software. Your goal is to develop this image (with new software and files) so you can run your experiment. It will only modify the environment of the image and not your laptop. Then you will be able to save and deploy the new image on cortexlab, without having to re-install everything and dealing with software compatibility and versioning. +Using docker, we will enable on your laptop an environment suitable for CorteXlab with gnuradio and needed software. Your goal is to develop this image (with new software and files) so you can run your experiment. It will only modify the environment of the image and not your laptop. Then you will be able to save and deploy the new image on cortexlab, without having to re-install everything and dealing with software compatibility and versioning. 
  
 Therefore, you can retrieve and run the following image. Therefore, you can retrieve and run the following image.
Line 44: Line 44:
   * ''scenario.yaml'': a out-dated scenario description file (in yaml format) that we will not use here   * ''scenario.yaml'': a out-dated scenario description file (in yaml format) that we will not use here
  
-Here, this is all the modifications we need to do in order to prepare our experiment. When it is working properly, you can exit the container with Ctrl + d. Now, let's save our updated container as a new docker image. We can then push it on dockerhub.+Here, this is all the modifications we need to do in order to prepare our experiment. When it is working properly, you can exit the container with Ctrl + d. Now, let's save our updated container as a new docker image. We can then push it on dockerhub (dockerhub is a repository of docker images, you need to create an account on it).
  
 <code> <code>
Line 95: Line 95:
 </code> </code>
  
-The file is self-explanatory, but for now let's ignore all but the indented lines following ''node4:'' and ''node6:''. You'll have the opportunity to understand the rest better later on. +The file is self-explanatory, but for now let's ignore all but the indented lines following ''node14:'' and ''node16:''. You'll have the opportunity to understand the rest better later on. 
  
 Let's go over each said line now: Let's go over each said line now:
  
-  * ''node4:'': This opens the node4 declaration of options+  * ''node14:'': This opens the node14 declaration of options
   * ''image:'': This indicates which image to download from dockerhub and run on the node     * ''image:'': This indicates which image to download from dockerhub and run on the node  
   * ''command: /usr/sbin/sshd -p 2222 -D'': opens the container to a ssh connection. During the task, you will access the node through its container with ssh and launch the experiment yourself. This way you can view log in real time and relaunch the experiment with different parameters without having to create a new task   * ''command: /usr/sbin/sshd -p 2222 -D'': opens the container to a ssh connection. During the task, you will access the node through its container with ssh and launch the experiment yourself. This way you can view log in real time and relaunch the experiment with different parameters without having to create a new task
  
-We will use this method for this example, but know that you can also use the ''command'' option in a different way, by directly giving the parameters of you experience and not going through ssh. + 
 +We will use the ssh method for this example, but know that you can also use the ''command'' option in a different way, by directly giving the parameters of you experience and not going through ssh. The idea is that when you're developing an experiment, you will go through trials and errors, parameter tweakings, and working interactively through ssh is the best option, When the experiment is running well and you want to reproduce it several times, on the other hand, it's best to automatize everything, so that you don't need to ssh to each node and run commands manually. It's also possible, for example, that you adjust interactively a receiver first, and when it's done, you run it automatically, and you keep the interactive sessions only for adjusting and tuning the emitter node(s).
  
 <code> <code>
Line 119: Line 120:
 </code> </code>
  
- * ''command: ./benchmark\_rx.py --antenna="TX/RX" --rx-gain=25 -v -W 2M -f 2.49G'': states the command to run on node4. Details of the parameters are:+ * ''command: ./benchmark\_rx.py --antenna="TX/RX" --rx-gain=25 -v -W 2M -f 2.49G'': states the command to run on node14. Details of the parameters are:
     * ''--antenna="TX/RX"'': this indicates which antenna connector to use on the USRP radio platform connected to the node     * ''--antenna="TX/RX"'': this indicates which antenna connector to use on the USRP radio platform connected to the node
     * ''--rx-gain=25'': this sets the receive gain of the USRP radio platform     * ''--rx-gain=25'': this sets the receive gain of the USRP radio platform
Line 180: Line 181:
 First we need to reserve the CorteXlab room: First we need to reserve the CorteXlab room:
  
-<code> +I a new browser window open the [CorteXlab web app](http://xp.cortexlab.fr/app). It will open in your current reservation list if you have any.
-you@srvairlock:~/workspace$ oarsub -l nodes=BEST,walltime=0:30:00 -I +
-</code>+
  
-(If you're running your reservation in a container reservation)+{{ ::screenshot_2022-12-13_at_11.46.27.png?nolink&700 |}} 
-<code> + 
-you@srvairlock:~/workspace$ oarsub -t inner=<id of container> -{"network_address in ('mnode4.cortexlab.fr''mnode6.cortexlab.fr')"}/nodes=2,walltime=0:30:00 -I +Use the "Book the testbed" button in the lower left corner. 
-</code>+ 
 +You'll get to screen that looks like this: 
 + 
 +{{ ::screenshot_2022-12-13_at_11.50.28.png?nolink&700 |}} 
 + 
 +Now let's create the reservation! 
 + 
 +Under "Book the testbed" select the date of your reservation: 
 + 
 +{{ ::screenshot_2022-12-13_at_11.52.34.png?nolink&700 |}} 
 + 
 +And using the clock icon select the start time of your reservation by dragging the clock pointers: 
 + 
 +{{ ::screenshot_2022-12-13_at_11.53.07.png?nolink&100 |}} and {{ ::screenshot_2022-12-13_at_11.53.18.png?nolink&100 |}} 
 + 
 +Nowin the duration, select the end of your reservation the same way as above. 
 + 
 +Finally select the nodes in the map of CorteXlab by clicking on the ones required for your experiment such that their color changes to orangeSince we're using 14 and 16those are the ones to be selected:
  
-(Be sure that no one else is using the same node as you)+{{ ::screenshot_2022-12-13_at_12.39.54.png?nolink&700 |}}
  
-This will run a 30 minute job and open a sub-shell in which you can run minus tasksThis sub-shell will be killed after 30 minutesand if you leave the shell earlierit will terminate the corresponding oar job. More documentation on oar can be found [[reserve|here]]. You can also monitor the current jobs in the [gantt web interface](http://xp.cortexlab.fr/drawgantt/).+Finally click on the "Book the testbed" buttonIf your reservation works (no conflicting options were chosen), you should be brought back to the reservations pageand a new line will appear with the number of your reservation.
  
 We then submit the minus task: We then submit the minus task:
Line 239: Line 255:
   
 # From node 16 # From node 16
-root@mnode14:~/ ./examples/my_task/benchmark_tx.py --antenna="TX/RX" --tx-amplitude=0.2 -v -W 2M -f 2.49G+root@mnode16:~/ ./examples/my_task/benchmark_tx.py --antenna="TX/RX" --tx-amplitude=0.2 -v -W 2M -f 2.49G
 </code> </code>
  
gnu_radio_docker_benchmark_example.txt · Last modified: 2024/03/08 15:59 by cmorin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki