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
# base | |
FROM node:17.9.0 AS base | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
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
#!/bin/bash | |
echo building image node_project:build | |
docker build -t node_project:build -f Dockerfile.build . | |
# create a new container from the image and copy dist folder content to distapp folder | |
docker create --name copyContainer node_project:build | |
docker cp copyContainer:/usr/src/app/dist ./distapp | |
docker rm -f copyContainer |
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
FROM node:17.9.0-alpine3.15 | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install --only=production | |
COPY distapp ./ |
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
FROM node:17.9.0 | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
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
pushd "%~dp0" | |
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hv.txt | |
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i" | |
del hv.txt | |
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL | |
pause |
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
void dataToArray(int* a, int n){ | |
int i; | |
for(i = 0;i < n; ++i){ | |
a[i]=i; | |
} | |
} |
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
__global__ void getSum(int *n1, int *n2, int *sumData, int size){ | |
int index = threadIdx.x + blockIdx.x * blockDim.x; | |
if( index<size ){ | |
sumData[index] = n1[index] + n2[index]; | |
} | |
} |
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
int main() { | |
int n1, n2, sum; | |
int *dN1, *dN2, *dSum; | |
int size = sizeof(int); | |
// allocate device memory | |
cudaMalloc((void **)&dN1, size); | |
cudaMalloc((void **)&dN2, size); |
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
int main(){ | |
int n1, n2, sum; | |
int *dN1, *dN2, *dSum; | |
int size = sizeof(int); | |
// allocate device memory | |
cudaMalloc((void **)&dN1, size); | |
cudaMalloc((void **)&dN2, size); | |
cudaMalloc((void **)&dSum, size); |
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
int main() { | |
int *n1, *n2, *sum; | |
int *dN1, *dN2, *dSum; | |
int size = sizeof(int); | |
// allocate device memory | |
cudaMalloc((void **)&dN1, size); | |
cudaMalloc((void **)&dN2, size); |
NewerOlder