-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthieu Hog
committed
Jul 15, 2024
1 parent
8ec1225
commit 69dad21
Showing
4 changed files
with
84 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
FROM python:3.6-alpine | ||
RUN apk add g++ | ||
RUN pip install numpy | ||
FROM python:3 | ||
RUN python -m pip install --no-cache-dir numpy | ||
RUN python -m pip install --no-cache-dir psutil | ||
#overwrides entry point otherwise will directly execute python | ||
ENTRYPOINT [ "/bin/bash", "-l", "-c" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,80 @@ | ||
from meshroom.core.plugin import CondaNode, DockerNode, PipNode, VenvNode | ||
import os | ||
|
||
class DummyCondaNode(CondaNode): | ||
commandLine = 'python -c "import numpy as np"' | ||
envFile = os.path.join(os.path.dirname(__file__), 'env.yaml') | ||
|
||
import os | ||
from meshroom.core.plugin import PluginNode, EnvType | ||
|
||
class DummyConda(PluginNode): | ||
|
||
category = 'Dummy' | ||
documentation = ''' ''' | ||
|
||
envType = EnvType.CONDA | ||
envFile = os.path.join(os.path.dirname(__file__), "env.yaml") | ||
|
||
inputs = [] | ||
outputs = [] | ||
|
||
def processChunk(self, chunk): | ||
import numpy as np | ||
print(np.abs(-1)) | ||
|
||
class DummyDocker(PluginNode): | ||
|
||
category = 'Dummy' | ||
documentation = ''' ''' | ||
|
||
envType = EnvType.DOCKER | ||
envFile = os.path.join(os.path.dirname(__file__), "Dockerfile") | ||
|
||
inputs = [] | ||
outputs = [] | ||
|
||
def processChunk(self, chunk): | ||
import numpy as np | ||
print(np.abs(-1)) | ||
|
||
|
||
class DummyVenv(PluginNode): | ||
|
||
category = 'Dummy' | ||
documentation = ''' ''' | ||
|
||
envType = EnvType.VENV | ||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt") | ||
|
||
inputs = [] | ||
outputs = [] | ||
|
||
class DummyDockerNode(DockerNode): | ||
commandLine = 'python -c "import numpy as np"' | ||
envFile = os.path.join(os.path.dirname(__file__), 'Dockerfile') | ||
def processChunk(self, chunk): | ||
import numpy as np | ||
print(np.abs(-1)) | ||
|
||
class DummyPip(PluginNode): | ||
|
||
category = 'Dummy' | ||
documentation = ''' ''' | ||
|
||
envType = EnvType.PIP | ||
envFile = os.path.join(os.path.dirname(__file__), "requirements.txt") | ||
|
||
inputs = [] | ||
outputs = [] | ||
|
||
class DummyPipNode(PipNode): | ||
commandLine = 'python -c "import numpy as np"' | ||
envFile = os.path.join(os.path.dirname(__file__), 'requirements.txt') | ||
def processChunk(self, chunk): | ||
import numpy as np | ||
print(np.abs(-1)) | ||
|
||
class DummyNone(PluginNode): | ||
|
||
category = 'Dummy' | ||
documentation = ''' ''' | ||
|
||
envType = EnvType.NONE | ||
envFile = None | ||
|
||
inputs = [] | ||
outputs = [] | ||
|
||
class DummyVenvNode(VenvNode): | ||
commandLine = 'python -c "import numpy as np"' | ||
envFile = os.path.join(os.path.dirname(__file__), 'requirements.txt') | ||
outputs = [] | ||
def processChunk(self, chunk): | ||
import numpy as np | ||
print(np.abs(-1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: dummy | ||
channels: | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- python>=3.7.6 | ||
- numpy | ||
- python | ||
- numpy | ||
- psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
numpy | ||
numpy | ||
psutil |