Skip to content

Commit

Permalink
Change: no longer supporting vcpkg, users must specify c, c++ setup
Browse files Browse the repository at this point in the history
  • Loading branch information
noderod committed Jun 13, 2018
1 parent a693c48 commit 8e909cf
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 15 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@
* Run the appropriate bash script to set up the email and password
* The basic set-up only allows for gmail, for all others, modify both *./api/preprocessing.py* and *./email_assimilator.py*
* Be sure to have input the correct name and password, to change them again, change */root/.bashrc*
* The same applies to the Docker, MIDAS credentials
* Log out of the container and in again so the changes take effect
Do:
```bash
bash password_credentials.sh
bash dockerhub_credentials.sh
exit
docker exec -it {APACHE SERVER} bash
bash red_setup.sh
Expand Down
8 changes: 5 additions & 3 deletions api/midas_processing/Dockerfile.ubuntu-midas
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

FROM ubuntu:16.04

COPY Mov_Specific.py /work/Mov_Specific.py
COPY Mov_Specific.py /Mov_Specific.py


RUN mkdir -p /root/shared/resultsr &&\
apt-get update && apt-get install curl wget tar python3 python3-pip -y
RUN mkdir -p /root/shared/results &&\
apt-get update && apt-get install curl wget tar python3 python3-pip cmake -y

WORKDIR /work
3 changes: 1 addition & 2 deletions api/midas_processing/MIDAS_Example_Submission_C++.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ OS) Ubuntu_16.04
# Comment
LANGUAGE) C++
LANGUAGE) python
LIBRARY) C++: armadillo
# armadillo can be installed via vcpckg so installation is done automatically
# User is REQUIRED to set-up armadillo paths manually
SETUP) setup_other_libraries.sh
COMMAND) C++:bridge_collapse.cpp
COMMAND) C++:paint_bridge.cpp
Expand Down
4 changes: 2 additions & 2 deletions api/midas_processing/Mov_Specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

# Finds the files needed to move
mov_files = []
with open("README.txt", "r") as README:
with open(PATH+"README.txt", "r") as README:

for line in README:
LLL = line.replace('\n', '')
if 'OUTPUT)' in LLL:
file_to_be_moved = LLL.replace('OUTPUT)', '').replace(' ')
file_to_be_moved = LLL.replace('OUTPUT)', '').replace(' ', '')
if 'ALL' == file_to_be_moved:
mov_files = os.listdir(PATH)
break
Expand Down
11 changes: 5 additions & 6 deletions api/midas_processing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

**Set-up**
MIDAS (Multiple Input Docker Automation System) is a TACC tool designed for automatic dockerization. To use this tool, use the MIDAS API to submit either a *.tgz* or a *tar.gz* file containing all the necessary files.
All files to be used must be inside, as well as a README.txt (required name, files without it will return an error) containing the set-up information.
All files to be used must be inside, as well as a README.txt (required name, files without it will return an error) containing the set-up information.
Users may assume root access.
To do so, use:
```bash
curl -F midas_file=MY_COMPRESSED_FILE.tgz http://SERVER_IP:5085/v2/midas_job/token=TOKEN
Expand Down Expand Up @@ -36,8 +37,8 @@ The languages supported by the program, more than one language may be used. The
* C (gcc)
* C++ (g++)

Each language is installed together with their package manager or, in the case of C++, MS vcpckg. The version installed for each language is the default used in the package manager. To use any custom manager, add the instruuctions in the setup file.
For the sake of future use, both python and python3 refer to python3 (same with pip), whereas python2 refers to python2. Python3 is always installed, since it is needed to recover the results for BOINC.
Each language is installed together with their package manager or. The version installed for each language is the default used in the package manager. To use any custom manager, add the instruuctions in the setup file.
For the sake of future use, both python and python3 refer to python3 (same with pip), whereas python2 refers to python2. Python3 is always installed, since it is needed to recover the results for BOINC.
Bash is also installed by default.
To add a new language, do:
```
Expand All @@ -50,9 +51,7 @@ Language libraries, installed in the order that the user provides. If they canno
set-up file. All libraries must be preceded by the language they support. BOINC does not support software which requires a license or monetary
cost to be used.
Libraries will be installed via the default package manager (pip for python, cargo for Rust, etc).
In the case of C, the specific libraries and paths must be provided (working directory is always */work/*). For C++, however, we will provide MS
vcpckg for simplicity. However, the user must make sure that the specific library can be downloaded via vcpckg. If it cannot, then the image will
not be built, resulting an error. For all other packages, the exact process must be written in the set-up file.
In the case of C and C++, the user must specify the install and set-up the appropriate paths using the set-up file.
To add a library, select the language first and then the language with the following syntax:
```
LANGUAGE) python
Expand Down
20 changes: 20 additions & 0 deletions dockerhub_credentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Sets up the email and password credentials for the BOINC server
# This file can only be run once
# After this, it is necessary to manually modify /root/.bashrc


printf "Establishes the Dockerhub login credentials\n"
printf "WARNING\nThis file can only be run once, after it, modify the values directly in /root/.bashrc\n"
printf "Leave empty for empty variable\n"

printf "Dockerhub account: "
read DOCKERHUB
printf "\nDockerhub password: "
read DOCKERHUB_PASSWORD

printf "\nexport DOCKERHUB=$DOCKERHUB\nexport DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD\n" >> /root/.bashrc
export DOCKERHUB=$DOCKERHUB
export DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD
printf "Your variables have now been set and are accessible from command line\n"
4 changes: 2 additions & 2 deletions password_credentials.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

#Sets up the email and password credentials for the BOINC server
# Sets up the email and password credentials for the BOINC server
# This file can only be run once
# After this, it is necessary to manually modify /root/.bashrc


printf "Append the user email and password, as well as the mysql password\n"
printf "Append the user email and password\n"
printf "WARNING\nThis file can only be run once, after it, modify the values directly in /root/.bashrc\n"
printf "Leave empty for empty variable\n"

Expand Down

0 comments on commit 8e909cf

Please sign in to comment.