Jump to content

XtyX

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Guys, I am currently learning Python and have started to learn Flask (Web Framework). I have created a simple Web App and since I have unRAID I thought I would try to get it running in a Docker Container. I played around and got it running with a few base images such as ubuntu:18.04 & python:3-alpine without persisting any data. So I have decided to try and tackle the task of persisting data. I am using a SQLite database via SqlAlchemy (ORM) & the app saves user uploaded images. I have been able to get it all working with the exception of permissions (The directories/files created are still owned by root). I decided to try using linuxserver's Ubuntu base image thinking that might solve my issue but no luck so far. Here is what I have: Dockerfile #LinuxServers base Ubuntu image FROM lsiobase/ubuntu:bionic #Update & Install Python, PIP & Virtual Environments RUN apt-get update && apt-get install \ -y python3 python3-pip python3-venv #Set Work Directory WORKDIR /app #Copy the App COPY . /app #Create Virtual Environment RUN python3 -m venv /app/venv #Activate Virtual Environment and install dependencies RUN . /app/venv/bin/activate && pip install -r requirements.txt #Expose Flask Port EXPOSE 5000 #Directory to store App's DB & Images VOLUME /config #Run the App CMD . /app/venv/bin/activate && exec python run.py (I know I don't need to run the App in a Virtual Environment but was I doing it to learn how Python venv works) run.py (The python file that creates the DB + Image folder in /Config and starts the App) import os import shutil from mywebapp import app from mywebapp import db #Create the database if it does not exist def createdb(): if not os.path.exists('/config/site.db'): db.create_all() #Create the images directory if it does not exist and copy the default image def createimgagefolder(): if not os.path.exists('/config/images'): os.mkdir('/config/images') if not os.path.exists('/config/images/default.png'): project_root = os.path.abspath(os.path.dirname(__file__)) defaultimgpath = os.path.join(project_root, 'myapp', 'static', 'img', 'default.png') shutil.copyfile(defaultimgpath, '/config/images/default.png') if __name__ == '__main__': createdb() createimgagefolder() #host must be 0.0.0.0 to be accessed from outside the containter app.run(host='0.0.0.0') __init__.py (I included this as this defines the location of the database: /config/site.db) from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) #Location of database app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////config/site.db' db = SQLAlchemy(app) #Import blueprints & register them from myapp.settings.routes import appsettings from myapp.posts.routes import posts from myapp.main.routes import main app.register_blueprint(appsettings) app.register_blueprint(posts) app.register_blueprint(main) docker run command run -d --name='myapp' --net='bridge' --cpuset-cpus='1,3,5,7,9,11' -e TZ="America/Denver" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -p '5000:5000/tcp' -v '/mnt/user/appdata/myapp':'/config':'rw' 'mydockerhubacct/myapp' So as I stated above the creation of db, image folder and copying of the default.png works but they are all owned by root. My understanding is that docker runs all of its containers under the root user domain. So i tried adding USER 99:100 to the docker file thinking that if the app was run as 99:100 then it would create the db and image folder as 99:100 but I get a mkdir permission error. I also tried changing the ownership after creation in run.py #Create the database if it does not exist def createdb(): if not os.path.exists('/config/site.db'): db.create_all() os.chown('/config/site.db', uid=99, gid=100) This works but doesn't seem like a great solution as I would also need to code it in my function that saves the images users upload. I have spent hours trying to figure out how others are doing this (such as LinuxServers Radarr, Sonarr etc) by reading their Dockerfiles and following it back to the Github repositories but it's got me stumped. Any help would be immensely appreciated! I am learning python, Flask, Docker etc. on my own and don't really have a teacher or mentor to ask any questions. I also want to thank Limetech for unRaid because that's what got me down the path of learning to code and experiment with Docker, and so far I am really enjoying it. Thanks guys!
  2. Tried taping over Pin 5 & 6 and no luck, made no difference.
  3. I purchased an LSI 9201-8i from Ebay (Seller has pre-flashed to IT Mode) https://www.ebay.ca/itm/Genuine-LSI-6Gbps-SAS-HBA-LSI-9201-8i-9211-8i-P20-IT-Mode-ZFS-FreeNAS-unRAID/162958581156?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649 The card is not recognized when inserted. I do not see the cards Bios screen on boot. The cards heartbeat light does not flash nor the activity lights. However there is a single small green LED that does light up when the card is inserted. Which I believe is the one circled in the pic below. Troubleshooting I have tried: Tested all PCIE slots with GPU (All work) Tried in all 3 PCIE slots Updated to the latest version of the MB Bios (4.10) - http://www.asrock.com/MB/Intel/Z370 Extreme4/index.asp#BIOS BIOS -> Boot -> CSM (Compatibility Support Module) -> Launch Storage OpROM Policy - I have tried changing this from "Legacy" to "UEFI only" BIOS -> Chipset Configuration -> PCIE Link Speed - Options "Auto", Gen 1, Gen 2 & Gen 3. - Have tried Auto & Gen 2 I have not tested this in another PC yet as I don;t have a spare, however I could probably find someone to test it for me if needed. Is this card not compatible with the Asrock Z370 Extreme4 MB or perhaps the card is dead? Any help/suggestions appreciated?
  4. Great Deal for USA - $159 - WD Elements 10TB Promo Code = EMCUTVY29 https://www.newegg.com/black-wd-elements-10tb/p/N82E16822234350 Here is a video on shucking these:
  5. Great Deal for Canadians - $249 - WD Elements 10TB Promo Code = CEMCEPRS23 https://www.newegg.ca/black-wd-elements-10tb/p/N82E16822234350 Here is a video on shucking these:
  6. Sounds like an incredible deal! Where are they located?
  7. Good Deal for Canadians https://www.newegg.ca/p/1Z4-0002-00MY7 $189 - WD Red 6TB NAS Hard Disk Drive - 5400 RPM Class SATA 6Gb/s 256MB Cache 3.5 Inch - WD60EFAX
  8. Also looking for a DC++ client
  9. I created a topic already it seems more appropriate here. I just installed unRAID and I am trying to pass through the onboard video Asrock Z370 Extreme4/I7 8700K (Intel IGD - UHD 630 iGPU) to a Windows 10 VM and just get a black screen when starting the VM. I am able to VNC when using all VM settings. I have installed Team Viewer and have been able to connect but only when using OVMF BIOS. I have also tried every combination of VM setup possible. Double checked all my Asrock BIOS settings, including setting Onboard Graphics as Primary Display etc.. IGD is in its own IOMMU group IOMMU group 1: [8086:3e92] 00:02.0 VGA compatible controller: Intel Corporation Device 3e92 And the Intel Device 00:2:0 is listed under GRAPHICS CARD in VM Setup. I did a lot of reading and it appears that perhaps the new Coffee Lake's iGPU may not be supported yet. Has anyone tried IGD pass through with an 8th gen? Any help is much appreciated. IOMMU group 0: [8086:3ec2] 00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 07) IOMMU group 1: [8086:3e92] 00:02.0 VGA compatible controller: Intel Corporation Device 3e92 IOMMU group 2: [8086:a2af] 00:14.0 USB controller: Intel Corporation 200 Series PCH USB 3.0 xHCI Controller [8086:a2b1] 00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem IOMMU group 3: [8086:a2ba] 00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1 IOMMU group 4: [8086:a282] 00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode] IOMMU group 5: [8086:a2e7] 00:1b.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #17 (rev f0) IOMMU group 6: [8086:a290] 00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #1 (rev f0) IOMMU group 7: [8086:a291] 00:1c.1 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #2 (rev f0) IOMMU group 8: [8086:a294] 00:1c.4 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0) IOMMU group 9: [8086:a298] 00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #9 (rev f0) IOMMU group 10: [8086:a2c9] 00:1f.0 ISA bridge: Intel Corporation Device a2c9 [8086:a2a1] 00:1f.2 Memory controller: Intel Corporation 200 Series PCH PMC [8086:a2f0] 00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio [8086:a2a3] 00:1f.4 SMBus: Intel Corporation 200 Series PCH SMBus Controller IOMMU group 11: [8086:15b8] 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V IOMMU group 12: [1b21:0612] 03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) IOMMU group 13: [1b21:2142] 04:00.0 USB controller: ASMedia Technology Inc. Device 2142
  10. Noob here just installed Unraid. I am trying to pass through the onboard video (Intel IGD - UHD 630 iGPU) to a Windows 10 VM and just get a black screen when starting the VM. I am able to VNC when using any VM setting. I have installed Team Viewer and have been able to connect but only when using BIOS OVMF. I have also tried every combination of VM setup possible. Double checked all BIOS settings, including Graphics Primary Display etc.. Intel Device 00:2:0 is listed under GRAPHICS CARD in VM Setup. I did a lot of reading and it appears that perhaps the new Coffee Lake's iGPU may not be supported yet. Any help is much appreciated. IOMMU group 0: [8086:3ec2] 00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 07) IOMMU group 1: [8086:3e92] 00:02.0 VGA compatible controller: Intel Corporation Device 3e92 IOMMU group 2: [8086:a2af] 00:14.0 USB controller: Intel Corporation 200 Series PCH USB 3.0 xHCI Controller [8086:a2b1] 00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem IOMMU group 3: [8086:a2ba] 00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1 IOMMU group 4: [8086:a282] 00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode] IOMMU group 5: [8086:a2e7] 00:1b.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #17 (rev f0) IOMMU group 6: [8086:a290] 00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #1 (rev f0) IOMMU group 7: [8086:a291] 00:1c.1 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #2 (rev f0) IOMMU group 8: [8086:a294] 00:1c.4 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0) IOMMU group 9: [8086:a298] 00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #9 (rev f0) IOMMU group 10: [8086:a2c9] 00:1f.0 ISA bridge: Intel Corporation Device a2c9 [8086:a2a1] 00:1f.2 Memory controller: Intel Corporation 200 Series PCH PMC [8086:a2f0] 00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio [8086:a2a3] 00:1f.4 SMBus: Intel Corporation 200 Series PCH SMBus Controller IOMMU group 11: [8086:15b8] 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V IOMMU group 12: [1b21:0612] 03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) IOMMU group 13: [1b21:2142] 04:00.0 USB controller: ASMedia Technology Inc. Device 2142
  11. Makes sense and will help in my decision. I agree 100% 8700k is the way to go. I am a bit confused here. From the earlier posts I thought you meant go with a 2.5" SSD rather than an M.2. I think what your saying is go with a cheaper M.2, Is that correct? The WD 1TB M.2 just went on sale on Newegg.ca (Canada) today for $349 CAD which I believe is $269 US I don't find it condescending at all. I really appreciate all the help and knowledge. Definitely helping to make decisions. I agree Yes I went a little high on this but it went on sale this weekend and I picked it up locally with $40 off I will likely go with the default mobo ram speed (not OC) I'll be watching for sales. I'm on PCpartpicker & Newegg daily with Price Alerts now set.
  12. I'm thinking of going with the Asus Prime Z370-A as well. I'm interested to hear how its worked out for you?
  13. I posted in the Hardware section but I think this section is more appropriate to the decisions I need to make at this point. I am struggling with making a decision on a CPU & Mobo combo. Here is my build thus far -> https://ca.pcpartpicker.com/list/HYMdCb 1 Windows VM for ripping my blurays to MKV with H.264 using Ripbot264 and as a daily driver. Plex Docker with 1-3 streams Max. No gaming at this time. I am now looking at the 7700k ($390 CAD) or the 8700k ($460 CAD). 7700k is 4.2GHz with 4 Core & 8700k is 3.7GHz with 6 Cores. So do I go for higher clock rate and less cores or more cores & lower clock rate? Next is the Mobo, I was originally looking at the Asrock Z270 Extreme4 cause of the 8 Sata Ports & Asmedia ASM1061 Sata-Controller ($223 CAD) or I could go with a cheaper 6 Sata Port MB and when more storage is needed buy a PCI expanstion slot for more SATA ports. Are there any pros/cons either way? Maybe I should go 8700k with Asus - Prime Z370-A, has 6 Sata ports & $200 CAD - Would save me $25 towards the 8700k Just looking for some comments/opinions? Thanks
  14. All of my prices are in Canadian. The mobo is $223 CA which equals $173 US. Will any modern mobo work with Unraid? is there any to avoid? The $350 US 8700k you posted equals $450 CAD and the I7 7700k ill be getting for $389 CAD equals $301 US. How am I not making any use of the M2? The M2 is now on sale in Canada for $259 which equals $200 US. Thanks for the feedback, its very helpful and I want to make the right decisions and not spend money where I don't need to.
  15. I'll keep my eyes open for External Sales. I'll take the speed of the M.2 for now, I think your right and I will eventually need more. When the time comes, Ill sell it and upgrade to a 1TB. Yes, I get 2 extra SATA Ports, and from my research on the forum, The Z270 Extreme4 was recommended for that reason and because of the ASMedia ASM1061 SATA-Controller which is supported by unRAID. Originally I was looking at the ASRock Z270 Pro4 until I saw the post below. However I do agree in the extra money to get 2 SATA ports as the Pro is $135 & the Extreme4 is $222, an $87 difference. Now i'm unsure The 7700k is on sale right now locally for $389, 8700k is $450. Only real reason for 7700k was for faster Blu-ray transcoding & now that its on sale, it seems to be a great deal. Likely 1 - 3 maxx Plex streams. I have never OC'd before but I would like to experiment with it. Picked up the PSU today cause it went on sale for $109 from $145 and also grabbed the Define R6 cause they matched the lowest online price of $198.