Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new sim flag for singularity #1885

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/coinstac-container-manager/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const getStatus = () => {
* @return {Object} Docker stats object
*/
const getStats = async (runId, userId) => {
if (!services[`${runId}-${userId}`]) {
if (!services[`${runId}-${userId}`] || globalServiceProvider !== 'docker' ) {
return null;
}
await services[`${runId}-${userId}`].service;
Expand Down
3 changes: 2 additions & 1 deletion packages/coinstac-simulator/bin/coinstac-simulator
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ program
.option('--username [username]', ' username for uploads')
.option('--password [password]', ' password for uploads')
.option('--loglevel [level]', ' enter info, debug, and silly log levels')
.option('--service [service]', 'container service, either singularity or docker, defaults to docker')
.option('--preprocess', 'preprocess');

program.on('--help', () => {
Expand Down Expand Up @@ -90,7 +91,7 @@ async function runPipeline(pipelineSpec, operatingDirectory) {
runMode: globalMode,
clientCount: count,
operatingDirectory: operatingDirectory || program.directory,

service: program.service || 'docker',
});
try {
const simRun = await started;
Expand Down
8 changes: 7 additions & 1 deletion packages/coinstac-simulator/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const portscanner = require('portscanner');
* @return {[type]} [description]
*/
const startRun = ({
spec, runMode = 'local', clientCount = 1, operatingDirectory = 'test',
spec,
runMode = 'local',
clientCount = 1,
operatingDirectory = 'test',
service = 'docker',
}) => {
return new Promise((resolve, reject) => {
portscanner.findAPortNotInUse(1883, 2001, '127.0.0.1')
Expand Down Expand Up @@ -50,6 +54,7 @@ const startRun = ({
mqttRemotePort: mqttPort,
mqttRemoteProtocol: 'mqtt:',
});
remoteManager.containerManager.setServiceProvider(service);
pipelines.remote = {
manager: remoteManager,
pipeline: remoteManager.startPipeline({
Expand All @@ -72,6 +77,7 @@ const startRun = ({
mqttRemotePort: mqttPort,
operatingDirectory: path.resolve(operatingDirectory),
});
localPipelineManager.containerManager.setServiceProvider(service);
pipelines.locals.push({
manager: localPipelineManager,
pipeline: localPipelineManager.startPipeline({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: coinstac
Version: 0.3.4b0
Version: 0.3.4
Summary: Python utility library for coinstac
Home-page: https://github.com/trendscenter/coinstac/coinstac-utilities/coinstac-python
Author: Ross Kelly
Expand Down
2 changes: 1 addition & 1 deletion packages/coinstac-utilities/coinstac-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='coinstac',
version='0.3.4-beta',
version='0.3.4',
description='Python utility library for coinstac',
url='https://github.com/trendscenter/coinstac/coinstac-utilities/coinstac-python',
author='Ross Kelly',
Expand Down