Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Mspatz/docker windows #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions Dockerfile.Windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
Copy link
Contributor

@jfResearchEng jfResearchEng Dec 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an github action can be added, that would be even better; in that case, for future main branch changes, your Windows dockerfile setup will be automatically checked. Examples can be found here: https://github.com/facebookresearch/labgraph/tree/main/.github/workflows


# Install Chocolatey
RUN powershell -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Install build deps using Chocolatey
RUN choco install -y python3 --version 3.6.8 && choco install -y buck visualstudio2019-workload-vctools
RUN pip install certifi wheel

WORKDIR c:\\labgraph
COPY . .

# Build LabGraph Wheel
RUN C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat && python setup_py36.py build
RUN C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat && python setup_py36.py install
RUN C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat && python setup_py36.py bdist_wheel

# Test LabGraph
# FIXME Test fails with /O2 & /MD
# RUN python -m pytest --pyargs -v labgraph._cthulhu
RUN python -m pytest --pyargs -v labgraph.events
RUN python -m pytest --pyargs -v labgraph.graphs
RUN python -m pytest --pyargs -v labgraph.loggers
RUN python -m pytest --pyargs -v labgraph.messages
RUN python -m pytest --pyargs -v labgraph.runners.tests.test_process_manager
RUN python -m pytest --pyargs -v labgraph.runners.tests.test_aligner
RUN python -m pytest --pyargs -v labgraph.runners.tests.test_cpp
# FIXME Test fails with /O2 & /MD
#RUN python -m pytest --pyargs -v labgraph.runners.tests.test_exception
RUN python -m pytest --pyargs -v labgraph.runners.tests.test_launch
RUN python -m pytest --pyargs -v labgraph.runners.tests.test_runner
15 changes: 14 additions & 1 deletion win.buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
cxxpp = win/cxxpp.bat
cxxpp_type = windows
cxx = win/cxx.bat
cxxflags = /std:c++17 /EHsc
cxx_type = windows
ld = win/ld.bat
linker_platform = windows

cxxppflags = \
/DNDEBUG

cxxflags = \
/std:c++17 \
/EHsc \
/external:W0 \
/O2 \
/GL \
/MD

ldflags = \
/LTCG