fix merge conflicts

This commit is contained in:
ssplatt committed 2021-09-29 13:32:41 -04:00
commit 6aae1d54bc
279 files changed
+209233 -58422

No files matched your search

+4 -27
View File
@@ -3,42 +3,19 @@ FROM node:16-alpine as BASE
FROM BASE as BUILDER
RUN apk add --no-cache python3 make g++ curl \
&& curl -sf https://gobinaries.com/tj/node-prune | sh
WORKDIR /app
COPY . .
WORKDIR /app/Platform
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/Foundations/TS/Task-Modules
RUN npm ci --only=production && node-prune
WORKDIR /app/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning
COPY ./package.json /app/package.json
COPY ./package-lock.json /app/package-lock.json
RUN npm ci --only=production && node-prune
FROM BASE
ENV PYTHONUNBUFFERED 1
RUN apk add --no-cache python3
WORKDIR /app
COPY . .
COPY --from=BUILDER /app/Platform/node_modules /app/Platform/node_modules
COPY --from=BUILDER /app/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules /app/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules
COPY --from=BUILDER /app/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/node_modules /app/Projects/Foundations/TS/Bot-Modules/API-Data-Fetcher-Bot/node_modules
COPY --from=BUILDER /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/node_modules /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/node_modules
COPY --from=BUILDER /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules /app/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules
COPY --from=BUILDER /app/Projects/Foundations/TS/Task-Modules/node_modules /app/Projects/Foundations/TS/Task-Modules/node_modules
COPY --from=BUILDER /app/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules /app/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules
COPY --from=BUILDER /app/node_modules /app/node_modules
RUN mkdir -p Data-Storage Log-Files My-Workspaces \
&& addgroup superalgos \
&& adduser --disabled-password --no-create-home --ingroup superalgos superalgos \
&& adduser --disabled-password --no-create-home --home /app --ingroup superalgos superalgos \
&& chown -R superalgos:superalgos /app
USER superalgos
EXPOSE 34248
EXPOSE 18041
-105
View File
@@ -1,105 +0,0 @@
const path = require("path");
const process = require("process");
const { exec } = require("child_process");
const systemCheck = require('./Launch-Scripts/system-check')
const platform = require('os').platform(); // Possible values are: 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'.
// Check system is set up correctly
systemCheck();
// Handle adding shortcuts
if (process.argv.includes("noShortcuts")) {
// Cancel running script if flag provided
console.log('');
console.log('noShortcuts ................................................... Setting up without shortcuts.')
} else {
// Run create-shortcuts script
try {
const { fork } = require('child_process')
fork('./Launch-Scripts/create-shortcut.js')
} catch (err) {
console.log('')
console.log(err)
console.log('')
}
}
// Create Operating System compatable paths to each node_modules directory.
let nodeModulesDirs = [
path.join( process.cwd(), "Platform"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Sensor-Bot", "Exchange-Raw-Data"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "API-Data-Fetcher-Bot"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Announcements"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Low-Frequency-Trading", "APIs"),
path.join( process.cwd(), "Projects", "Foundations", "TS", "Task-Modules")
];
if (
process.argv.includes("TensorFlow") ||
process.argv.includes("tensorflow") ||
process.argv.includes("--TensorFlow") ||
process.argv.includes("-TensorFlow") ||
process.argv.includes("--tensorflow") ||
process.argv.includes("--tensorflow")
) {
nodeModulesDirs = [
path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")
]
}
// Check if WinOS because extra dependencies may be required for tfjs:
var tfjsWinInstallFlag = false;
if (platform === 'win32') { // *Note: win32 == win32 || win64
tfjsWinInstallFlag = true;
}
console.log('');
console.log("Installing node dependencies at the following directories:");
console.log('');
console.log(nodeModulesDirs);
console.log('');
for (let dir of nodeModulesDirs) {
// Loop through directories and run npm ci in a child process shell.
let command = "echo Results of install at "+ dir + " & npm ci";
exec( command,
{
cwd: dir
},
function ( error, stdout ){
if (error) {
console.log('');
console.log("There was an error installing some dependencies error: ");
console.log('');
console.log( error );
if (tfjsWinInstallFlag == true && dir == path.join(process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")) {
tfjsWinInstall();
}
return;
}
console.log('');
console.log( stdout );
});
};
/* If WinOS && error with tfjs installation:
* This is a well known and documented issue with @Tensorflow/tfjs-node installation on WinOS.
* npm's windows-build-tools via: `npm install --global --production windows-build-tools` &&
* `npm install -g node-gyp` can sometimes correct the issue but not always depending on the
* version and options the user defined when installing npm/nodejs.
* The best reliable way to correct that I (Pluvtech) have found to work on many versions of WinOS
* is to reinstall nodejs and select to install chocolatey during the installation configuration.
*/
function tfjsWinInstall() {
console.log("\n*** Note to Windows Users Regarding the Superalgos TensorFlow Project ***");
console.log("If you have no other errors with this setup script and do not wish to use the TensorFlow Project:\nThen all is successful with your Superalgos setup and you may proceed to use the software.");
console.log("\nIf you do wish to install the @Tensorflow/tfjs-node modules required for use with the Superalgos TensorFlow Project:");
console.log("In this case it is likely your system is missing some dependencies required to build the TensorFlow (tfjs-node) bindings and you will need to follow the below steps:");
console.log("\n1.) Reinstall node.js from https://nodejs.org/en/download/ @Version 14.17.5 or higher.\nDuring installation, when you arrive at the 'Tools for Native Modules' screen you need to select the box to:\n\t'Automatically install the necessary tools...Chocolatey...'");
console.log("Doing this will cause a pop-up script in a new window which will install many npm/node tools and dependencies for use within the WinOS ecosystem.");
console.log("2.) When the installations finally complete you need to navigate back to your Superalgos directory and run `node setup` again.\n");
}