center-for-threat-informed-defense / tram

TRAM is an open-source platform designed to advance research into automating the mapping of cyber threat intelligence reports to MITRE ATT&CK®.
https://ctid.mitre-engenuity.org/our-work/tram/
Apache License 2.0
455 stars 98 forks source link

Installation instructions need significant overhaul #169

Closed Lex1020 closed 2 years ago

Lex1020 commented 2 years ago

I'm trying to install TRAM but the installation instructions leave a lot to be desired.

Simply put the docker compose file fails immediately because it cannot locate the Dockerfile. If It give that an absolute path then it gets as far as trying to pip install which fails because it can't locate the requirements.txt file. I can install those manually but then I get an error that it appears not to be a python project because it's missing a pyproject.toml file despite that file being in the directory that the python script is looking in.

Is there a more complete installation guide for this because simply running docker-compose -f docker-compose.yml up like it says in the instructions is not enough.

mehaase commented 2 years ago

Thank you for bringing this to my attention. I opened this PR with some revamped documentation.

Can you try the instructions on this branch and let me know if this solves your problem? https://github.com/center-for-threat-informed-defense/tram/tree/169-install-instructions#installation

Lex1020 commented 2 years ago

I tried those steps and got this error:

root@tram:~# docker-compose up Building tram unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Dockerfile: no such file or directory ERROR: Service 'tram' failed to build : Build failed

Lex1020 commented 2 years ago

If I move the docker-compose.yml file in the tram folder then I get this error;

root@tram:~/tram# docker-compose up Creating network "tram_default" with the default driver Creating volume "tram_tram" with default driver Creating volume "tram_tram_static" with default driver Building tram unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/Dockerfile: no such file or directory ERROR: Service 'tram' failed to build : Build failed

mehaase commented 2 years ago

Ahh okay, I see. I didn't realize that it was failing in the build step. Can you try running docker-compose up --no-build instead? That should force it to download images from Docker Hub instead of building them locally. If that works for you, I will remove the build: keys from docker-compose.yml.

watgh commented 2 years ago

?I tried that and it said tram needed to be built.

But when I manually pulled tram and tram-nginx manually, and then ran docker compose, tram came up just fine.


From: Mark E. Haase @.***> Sent: Wednesday, March 30, 2022 2:13 PM To: center-for-threat-informed-defense/tram Cc: Subscribed Subject: [EXTERNAL] Re: [center-for-threat-informed-defense/tram] Installation instructions need significant overhaul (Issue #169)

Ahh okay, I see. I didn't realize that it was failing in the build step. Can you try running docker-compose up --no-build instead? That should force it to download images from Docker Hub instead of building them locally. If that works for you, I will remove the build: keys from docker-compose.yml.

- Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https://github.com/center-for-threat-informed-defense/tram/issues/169*issuecomment-1083458954__;Iw!!NFAdMAnI0yk!Xjo6_XCtEY_DxOcoXWllKLsYRYTLoMB7T9s0G0njWvdRcE94IxXrRcVrrdtRWS8vQh17UA$, or unsubscribe [github.com]https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AWEQ4NDOEW2GYDUP4P4CGO3VCSKVJANCNFSM5RUDX5EQ__;!!NFAdMAnI0yk!Xjo6_XCtEY_DxOcoXWllKLsYRYTLoMB7T9s0G0njWvdRcE94IxXrRcVrrdtRWS9KYkVN-w$. You are receiving this because you are subscribed to this thread.Message ID: @.***>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

Lex1020 commented 2 years ago

The same happened to me, tram came up when I pulled the docker images manually, however it seems broken.

I can login and everything but when I click to analyze a document nothing appears. This happens with both the test data already there and any document I manage to upload.

Tram will que it and say that I have 160 ish things to review but when I click analyze; nothing.

mehaase commented 2 years ago

I removed the build keys from docker-compose.yml which should solve this issue if you use the new version of docker-compose.yaml. If you find the installation instructions are still not adequate, please re-open the issue and I'll take another look.

I can login and everything but when I click to analyze a document nothing appears. This happens with both the test data already there and any document I manage to upload.

The bootstrap training data is large and it can take a few seconds to load. (There's no loading indicator but it should eventually load.) There's a small test file in the repository that you can upload to make sure that the upload/analyze workflow is functioning: https://github.com/center-for-threat-informed-defense/tram/blob/master/tests/data/simple-test.docx

If you find that even this test file is not working, please open a new issue and we can work out what's going on.