| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,10 @@ | |||
| 1 | + .dockerignore | ||
| 2 | + .env | ||
| 3 | + .git | ||
| 4 | + .gitignore | ||
| 5 | + .vs | ||
| 6 | + .vscode | ||
| 7 | + docker-compose.yml | ||
| 8 | + docker-compose.*.yml | ||
| 9 | + */bin | ||
| 10 | + */obj | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + <Project Sdk="Microsoft.NET.Sdk"> | ||
| 2 | + | ||
| 3 | + <PropertyGroup> | ||
| 4 | + <OutputType>Exe</OutputType> | ||
| 5 | + <TargetFramework>netcoreapp2.1</TargetFramework> | ||
| 6 | + <Configurations>Debug;Release</Configurations> | ||
| 7 | + </PropertyGroup> | ||
| 8 | + | ||
| 9 | + <ItemGroup> | ||
| 10 | + <ProjectReference Include="..\src\runtime\Python.Runtime.15.csproj" /> | ||
| 11 | + </ItemGroup> | ||
| 12 | + | ||
| 13 | + <ItemGroup> | ||
| 14 | + <None Update="requirements.txt"> | ||
| 15 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| 16 | + </None> | ||
| 17 | + </ItemGroup> | ||
| 18 | + | ||
| 19 | + </Project> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,26 @@ | |||
| 1 | + FROM microsoft/dotnet:2.1-runtime AS base | ||
| 2 | + RUN apt-get update -y && apt-get install python3 -y && apt-get install python3-pip -y | ||
| 3 | + RUN ldconfig | ||
| 4 | + | ||
| 5 | + WORKDIR /app | ||
| 6 | + | ||
| 7 | + FROM microsoft/dotnet:2.1-sdk AS build | ||
| 8 | + WORKDIR /src | ||
| 9 | + COPY DockerTest/DockerTest.csproj DockerTest/ | ||
| 10 | + RUN dotnet restore DockerTest/DockerTest.csproj | ||
| 11 | + COPY . . | ||
| 12 | + WORKDIR /src/DockerTest | ||
| 13 | + RUN dotnet build DockerTest.csproj -c ReleasePy3 -o /app | ||
| 14 | + | ||
| 15 | + FROM build AS publish | ||
| 16 | + RUN dotnet publish DockerTest.csproj -c ReleasePy3 -o /app | ||
| 17 | + | ||
| 18 | + FROM base AS final | ||
| 19 | + WORKDIR /app | ||
| 20 | + COPY --from=publish /app . | ||
| 21 | + | ||
| 22 | + RUN pip3 install --no-cache-dir -r requirements.txt | ||
| 23 | + | ||
| 24 | + ENV LD_LIBRARY_PATH /usr/lib/python3.5/config-3.5m-x86_64-linux-gnu | ||
| 25 | + | ||
| 26 | + ENTRYPOINT ["dotnet", "DockerTest.dll"] | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,17 @@ | |||
| 1 | + using Python.Runtime; | ||
| 2 | + using System; | ||
| 3 | + | ||
| 4 | + namespace DockerTest | ||
| 5 | + { | ||
| 6 | + class Program | ||
| 7 | + { | ||
| 8 | + static void Main(string[] args) | ||
| 9 | + { | ||
| 10 | + Console.WriteLine("Hello World!"); | ||
| 11 | + | ||
| 12 | + var state = Py.GIL(); | ||
| 13 | + var sys = Py.Import("sys"); | ||
| 14 | + var np = Py.Import("numpy"); | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + numpy | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,25 @@ | |||
| 1 | + <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | + <Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk"> | ||
| 3 | + <ItemGroup Label="ProjectConfigurations"> | ||
| 4 | + <ProjectConfiguration Include="Debug|AnyCPU"> | ||
| 5 | + <Configuration>Debug</Configuration> | ||
| 6 | + <Platform>AnyCPU</Platform> | ||
| 7 | + </ProjectConfiguration> | ||
| 8 | + <ProjectConfiguration Include="Release|AnyCPU"> | ||
| 9 | + <Configuration>Release</Configuration> | ||
| 10 | + <Platform>AnyCPU</Platform> | ||
| 11 | + </ProjectConfiguration> | ||
| 12 | + </ItemGroup> | ||
| 13 | + <PropertyGroup Label="Globals"> | ||
| 14 | + <ProjectVersion>2.1</ProjectVersion> | ||
| 15 | + <DockerTargetOS>Linux</DockerTargetOS> | ||
| 16 | + <ProjectGuid>7b1fe155-4e45-42a7-9a4b-0a19f12d89ac</ProjectGuid> | ||
| 17 | + </PropertyGroup> | ||
| 18 | + <ItemGroup> | ||
| 19 | + <None Include="docker-compose.override.yml"> | ||
| 20 | + <DependentUpon>docker-compose.yml</DependentUpon> | ||
| 21 | + </None> | ||
| 22 | + <None Include="docker-compose.yml" /> | ||
| 23 | + <None Include=".dockerignore" /> | ||
| 24 | + </ItemGroup> | ||
| 25 | + </Project> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + version: '3.4' | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + version: '3.4' | ||
| 2 | + | ||
| 3 | + services: | ||
| 4 | + dockertest: | ||
| 5 | + image: ${DOCKER_REGISTRY}dockertest | ||
| 6 | + build: | ||
| 7 | + context: . | ||
| 8 | + dockerfile: DockerTest/Dockerfile | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <PropertyGroup> | |
| 6 | 6 | <TargetFrameworks>net40</TargetFrameworks> | |
| 7 | 7 | <Platforms>x64;x86</Platforms> | |
| 8 | - <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations> | ||
| 8 | + <Configurations>Debug;DebugPY3;Release;ReleasePY3</Configurations> | ||
| 9 | 9 | <RootNamespace>clrmodule</RootNamespace> | |
| 10 | 10 | <AssemblyName>clrmodule</AssemblyName> | |
| 11 | 11 | <PackageId>clrmodule</PackageId> | |
@@ -46,29 +46,16 @@ | |||
| 46 | 46 | <Optimize>true</Optimize> | |
| 47 | 47 | <DebugType>pdbonly</DebugType> | |
| 48 | 48 | </PropertyGroup> | |
| 49 | - | ||
| 50 | - <PropertyGroup Condition=" '$(Configuration)' == 'DebugMono'"> | ||
| 51 | - <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants> | ||
| 52 | - </PropertyGroup> | ||
| 53 | - <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMono'"> | ||
| 54 | - <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants> | ||
| 55 | - </PropertyGroup> | ||
| 56 | - <PropertyGroup Condition=" '$(Configuration)' == 'DebugWin'"> | ||
| 49 | + <PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
| 57 | 50 | <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants> | |
| 58 | 51 | </PropertyGroup> | |
| 59 | - <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWin'"> | ||
| 52 | + <PropertyGroup Condition="'$(Configuration)'=='Release'"> | ||
| 60 | 53 | <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants> | |
| 61 | 54 | </PropertyGroup> | |
| 62 | - <PropertyGroup Condition=" '$(Configuration)' == 'DebugMonoPY3'"> | ||
| 63 | - <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants> | ||
| 64 | - </PropertyGroup> | ||
| 65 | - <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMonoPY3'"> | ||
| 66 | - <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants> | ||
| 67 | - </PropertyGroup> | ||
| 68 | - <PropertyGroup Condition=" '$(Configuration)' == 'DebugWinPY3'"> | ||
| 55 | + <PropertyGroup Condition="'$(Configuration)'=='DebugPY3'"> | ||
| 69 | 56 | <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants> | |
| 70 | 57 | </PropertyGroup> | |
| 71 | - <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWinPY3'"> | ||
| 58 | + <PropertyGroup Condition="'$(Configuration)'=='ReleasePY3'"> | ||
| 72 | 59 | <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants> | |
| 73 | 60 | </PropertyGroup> | |
| 74 | 61 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments