YouTube2Text

How to install Jesse using docker for local algo-trading development — Transcript

by Algo-trading with Saleh · 2,188 words · 336 segments · language en · Watch on YouTube

Full transcript

  1. 0:00in this video i will show you how to get
  2. 0:01started with jesse using docker for
  3. 0:04local algo trading development the image
  4. 0:06that i'll be using has all the
  5. 0:07dependencies installed so you don't even
  6. 0:09need to install python i will also show
  7. 0:11you how to enable code intellisense in
  8. 0:13vs code which you make development so
  9. 0:15much easier let's get started
  10. 0:21the installation process is pretty
  11. 0:23simple and straightforward there's also
  12. 0:24a good chance that you already have
  13. 0:26docker installed on your machine to
  14. 0:28check if you do open a terminal app and
  15. 0:30try running docker
  16. 0:32and docker compose if you get errors
  17. 0:35like these ones saying the command is
  18. 0:37not found then you need to install it
  19. 0:39let's begin with windows to download the
  20. 0:42docker desktop go to docker.com get
  21. 0:45started
  22. 0:46and click on the download button
  23. 0:48i already downloaded this before so i'm
  24. 0:50going to cancel this
  25. 0:52once you have the setup file go ahead
  26. 0:54and open it
  27. 0:55there is not much to the setup process
  28. 0:57just make sure that at least the first
  29. 0:59option is checked press ok and give the
  30. 1:01installation process a few minutes to
  31. 1:03finish
  32. 1:04all right now you should be able to use
  33. 1:05docker
  34. 1:07go ahead and open the docker desktop
  35. 1:10and here you can see the status of
  36. 1:12docker in my case it is running
  37. 1:15next i'll cover mac os i'll begin by
  38. 1:17googling download docker and the first
  39. 1:20result is what i want based on the cpu
  40. 1:23type that you are using choose the right
  41. 1:25one for you i'm on m1 mac so i'll choose
  42. 1:27the right one
  43. 1:29once the download is done go ahead and
  44. 1:31open the downloaded file
  45. 1:33and drag and drop the docker icon into
  46. 1:36your applications folder give it about a
  47. 1:38minute to finish copying and then we
  48. 1:41should be good to go
  49. 1:43open docker
  50. 1:45choose open
  51. 1:46next it will ask for permissions click
  52. 1:49on ok
  53. 1:50and enter your password
  54. 1:52read the service agreement and choose
  55. 1:54accept the animation of the docker icon
  56. 1:57means that it's still starting
  57. 1:59once that is done you should be able to
  58. 2:01open the docker desktop
  59. 2:03and it should say docker desktop is
  60. 2:05running also if you hover your mouse
  61. 2:07here it should say engine running
  62. 2:09now let's cover the ubuntu distribution
  63. 2:11of linux since i don't have a linux
  64. 2:14machine at my hands right now i created
  65. 2:16this vps with ubuntu any salt on it so
  66. 2:18i'm going to ssh into it
  67. 2:23and starting now whatever i enter will
  68. 2:25be inside a linux machine since this is
  69. 2:27a fresh vps the first thing that i need
  70. 2:29to do is to update the repositories
  71. 2:33to install docker on ubuntu you could
  72. 2:35use their official install script you
  73. 2:37can also find the commands for the
  74. 2:38script on jess's documentation website
  75. 2:40there is one command for docker and
  76. 2:42another for docker compose just copy and
  77. 2:45paste them into your terminal
  78. 2:49and you should be good to go
  79. 2:51no matter which operating system you're
  80. 2:53using docker on what matters is that at
  81. 2:55the end of the installation process you
  82. 2:57should be able to run both the docker
  83. 2:59and docker compose commands without
  84. 3:01getting an error
  85. 3:03[Music]
  86. 3:07most likely at this point you already
  87. 3:08have a gc project but just in case i'll
  88. 3:10show you how to create a new one
  89. 3:12on the documentation website go to
  90. 3:15installation
  91. 3:17create a new jesse project
  92. 3:19and copy and paste these commands into
  93. 3:22the directory that you want your project
  94. 3:24to live in if you want you can change
  95. 3:25the name my bot into anything that you
  96. 3:27like
  97. 3:28obviously for cloning via git you need
  98. 3:30to have git installed on your machine if
  99. 3:32you don't you can always go and copy the
  100. 3:35github address paste it into your
  101. 3:37browser click on the green code button
  102. 3:40and download the project as a zip file i
  103. 3:42already have it get installed on my
  104. 3:44machine so now i will sit into my
  105. 3:47project
  106. 3:49and lastly i will create a dot and v
  107. 3:52file by copying from the example file
  108. 3:55and to make sure that the project files
  109. 3:57are present i'll run ls jesse projects
  110. 4:00ship with docker configuration files
  111. 4:02ready out of the box even the default
  112. 4:04values in the dot mv file are set to
  113. 4:07work with docker for example for a
  114. 4:09postgres host it says if not using
  115. 4:11docker you probably want to set this to
  116. 4:13localhost
  117. 4:14and the same goes for redis host so for
  118. 4:17now i don't need to change anything in
  119. 4:18this file to start jesse with docker
  120. 4:21first cd into the docker directory and
  121. 4:25run docker compose
  122. 4:27up the first time that you run this
  123. 4:29command docker will pull the official
  124. 4:31image from docker hub and then start the
  125. 4:33containers and the speed of this process
  126. 4:36depends on your internet connection
  127. 4:40once all the images are pulled docker
  128. 4:42will start the containers the first time
  129. 4:44it needs to initiate the database so
  130. 4:46just give it a good minute and when it's
  131. 4:48done you should see the url of your
  132. 4:50jesse dashboard go ahead copy this url
  133. 4:53and paste it into your browser
  134. 4:55if you see the jse logo it means it's
  135. 4:57working but for some users especially
  136. 4:59windows users this url doesn't work in
  137. 5:02such cases replace the hostname from
  138. 5:04four zeros into localhost the password
  139. 5:07of the dashboard is set inside your
  140. 5:09projects.nv file
  141. 5:12the default is set to test but make sure
  142. 5:14to change it if you are on a production
  143. 5:16server
  144. 5:20to make sure that everything works
  145. 5:21properly let's import some candles
  146. 5:24the binance exchange is fine let's
  147. 5:26change the symbol into btc usct and
  148. 5:30change the sort date
  149. 5:32to january
  150. 5:34and then click on sort
  151. 5:38all right everything looks good
  152. 5:40the back test section is where i can run
  153. 5:42back test simulations here are the lists
  154. 5:45of strategies which currently there's
  155. 5:47just one example to create my own i will
  156. 5:50click on the three dots button and
  157. 5:52choose new strategy and name it my first
  158. 5:55strategy
  159. 5:57to modify it i need to open the project
  160. 6:00inside an editor i use vs code which is
  161. 6:02open source and simple to use to
  162. 6:04download it go to their website and
  163. 6:06choose the one for your operating system
  164. 6:08there are multiple ways for opening my
  165. 6:10project in vs code i usually use the
  166. 6:12terminal so while keeping the terminal
  167. 6:14window that's running the containers i
  168. 6:16will open another one and make sure that
  169. 6:18i am still inside the correct directory
  170. 6:20by running the ls command now i can run
  171. 6:23code dot what this will do is to open
  172. 6:26the current directory in vs code the
  173. 6:28first time that you do this it will ask
  174. 6:30you whether or not you trust the others
  175. 6:32of this project and i do
  176. 6:35you could also use the open folder
  177. 6:36option in vs code's file menu for
  178. 6:38opening your project
  179. 6:41the strategy that i just created is
  180. 6:43located at strategies
  181. 6:45my first strategy
  182. 6:47and in this file so this looks good and
  183. 6:50i can start writing code
  184. 6:52[Music]
  185. 6:56code intellisense is a great feature in
  186. 6:58vs code it enables your editor to
  187. 7:00understand the code that you write that
  188. 7:02means first of all if you cache any
  189. 7:03syntax errors you might make and
  190. 7:05secondly it will show you the code
  191. 7:06completion for what you write which
  192. 7:08makes development so much faster in the
  193. 7:10past i used docker for production and
  194. 7:12not for development one of the main
  195. 7:14reasons was that features such as code
  196. 7:16intellisense were not available with
  197. 7:17this type of setup however recently vs
  198. 7:20code added support for docker containers
  199. 7:21using an extension called remote
  200. 7:23containers as you can see here right now
  201. 7:26vs code is using the python version of
  202. 7:28my local machine and not the one that's
  203. 7:30installed inside the docker container in
  204. 7:32your case you might not even have python
  205. 7:34installed on your machine at all
  206. 7:36for example let's try to add a new
  207. 7:38property method to my strategy using the
  208. 7:41ema indicator
  209. 7:43limit short trend and i want it to tell
  210. 7:46me if the 21 ema is above the 50. to get
  211. 7:49the 21 ema i will say ema 21 equals and
  212. 7:54notice that i have already imported the
  213. 7:56indicators module as ta
  214. 7:59so if i say ta
  215. 8:01dot it should have shown me a list of
  216. 8:03the available indicators and if i said e
  217. 8:06it should have shown me the ema so let's
  218. 8:09go ahead and install the remote
  219. 8:10containers extension so that i can
  220. 8:12connect to my container directly before
  221. 8:15i install the extension if you are on
  222. 8:17windows or linux there are a few
  223. 8:19conditions that you need to make sure
  224. 8:20are in place before installing the
  225. 8:22extension i'm on a mac and i already
  226. 8:24installed docker desktop so i can
  227. 8:26continue
  228. 8:27i'm gonna copy the name of the extension
  229. 8:29from here open the extension section in
  230. 8:32vs code and paste it into the search box
  231. 8:35click on the install button give it a
  232. 8:37few seconds to finish and we're done
  233. 8:39alright let's close the extension tab
  234. 8:42and notice that i'm still running
  235. 8:43gestures containers inside my terminal
  236. 8:46so you don't have to stop them before
  237. 8:47doing the next step
  238. 8:49inside vs code open the command palette
  239. 8:51and search for remote containers attach
  240. 8:54choose the first one
  241. 8:57and now you can see a list of the
  242. 8:59running containers on docker i have
  243. 9:01three which all of them are related to
  244. 9:04jesse but the one that i want to open
  245. 9:06with vs code that contains the python
  246. 9:08and my project files is jesse the first
  247. 9:11time that you do this it will take
  248. 9:12previous code a few seconds to install
  249. 9:14some stuff once that is done it will
  250. 9:16open a new vs code window so you can
  251. 9:18close the previous one if you like now
  252. 9:20that we're running inside container even
  253. 9:22the vs codes built-in terminal is
  254. 9:24running commands inside the container i
  255. 9:26know this because the root user that you
  256. 9:28see here is not what i have on my mac
  257. 9:30terminal
  258. 9:31and if i run the pwd command you'll see
  259. 9:34that we are in the root directory which
  260. 9:36doesn't exist on my mac now to open the
  261. 9:38project files click on open folder go
  262. 9:41back choose the home directory
  263. 9:45and click on ok
  264. 9:49now again i will open my strategy
  265. 9:51located at strategies my first strategy
  266. 9:55and the init file
  267. 9:57and now if i scroll down and try to
  268. 9:58write the same line again i still don't
  269. 10:00get auto complete but this time the
  270. 10:03reason is different even though i have
  271. 10:05the python intellisense plugin installed
  272. 10:07on my main vs code the version of vs
  273. 10:10code that's running inside the container
  274. 10:12doesn't have it installed so i need to
  275. 10:14install it one more time for this
  276. 10:15container so i'll open the extensions
  277. 10:18section
  278. 10:19and search for python the first result
  279. 10:22is what i want and notice that this time
  280. 10:24the install button says install in
  281. 10:26container
  282. 10:27click on it and give it a few seconds to
  283. 10:29finish
  284. 10:30and now the vs code is telling me that i
  285. 10:32need to choose the python interpreter
  286. 10:35notice that the python version that's
  287. 10:37here is the one inside the container and
  288. 10:39not the one that was installed on my
  289. 10:41local machine
  290. 10:43so now if i try to remove this line and
  291. 10:45write it again i should get code
  292. 10:47completion
  293. 10:50not only i get code completion it will
  294. 10:52also tell me the accepted parameters of
  295. 10:54the function which is really useful
  296. 11:05and also if i make a syntax error it
  297. 11:07should recognize it
  298. 11:10[Music]
  299. 11:14i often release new versions of jesse
  300. 11:16containing bug fixes new features and
  301. 11:18improvements so it's important to
  302. 11:20regularly update your json installation
  303. 11:22with this setup it's super easy let me
  304. 11:24show you open the terminal that's
  305. 11:26running the containers and press ctrl
  306. 11:28and c to assume them
  307. 11:32this is optional but to make sure that
  308. 11:34they are not running you could always
  309. 11:35run docker ps this command prints out
  310. 11:38all the currently running containers and
  311. 11:40i have none to see a list of all the
  312. 11:42containers even the ones that are
  313. 11:43stopped add a hyphen a flag at the end
  314. 11:46of it
  315. 11:47it says right here that the jc container
  316. 11:49was stopped 31 seconds ago to update
  317. 11:52your jc image to the latest version just
  318. 11:54run docker compose
  319. 11:56pull in my case there hasn't been any
  320. 11:58new version so it's not doing anything
  321. 12:00but in your case if there are newer
  322. 12:02versions it will download it so the next
  323. 12:04time that you run docker compose
  324. 12:06up it will store the containers using
  325. 12:08the updated image
  326. 12:10to see the jc version that you're
  327. 12:12running open the about section and look
  328. 12:14for the jesse version
  329. 12:16if you want to know how to set up a
  330. 12:17remote dev environment in vs code check
  331. 12:19out this video and if you want to use
  332. 12:21docker for deploying your jc project for
  333. 12:23live trading on a server then check out
  334. 12:25this one please subscribe to the channel
  335. 12:26if you haven't already thanks for
  336. 12:28watching

About this transcript

This page contains the full transcript of How to install Jesse using docker for local algo-trading development by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 2,188 words across 336 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.