Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
yuaanlin committed Aug 1, 2023
2 parents 4957084 + 7a31283 commit 62f09e5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
23 changes: 8 additions & 15 deletions internal/nodejs/__snapshots__/template_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ ENV PORT=8080
WORKDIR /src

RUN corepack enable && corepack prepare --all
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./
COPY . .

RUN yarn install

COPY . .

# Build if we can build it


Expand All @@ -29,12 +27,10 @@ ENV PORT=8080
WORKDIR /src

RUN corepack enable && corepack prepare --all
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./
COPY . .

RUN yarn install

COPY . .

# Build if we can build it


Expand All @@ -46,6 +42,7 @@ RUN echo "\
server { \
listen 8080; \
root /usr/share/nginx/html/static; \
absolute_redirect off; \
location / { \
try_files \$uri \$uri.html \$uri/index.html /404.html =404; \
} \
Expand All @@ -62,12 +59,10 @@ ENV PORT=8080
WORKDIR /src

RUN corepack enable && corepack prepare --all
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./
COPY . .

RUN yarn install

COPY . .

# Build if we can build it


Expand All @@ -79,6 +74,7 @@ RUN echo "\
server { \
listen 8080; \
root /usr/share/nginx/html/static; \
absolute_redirect off; \
location / { \
try_files \$uri /index.html; \
} \
Expand All @@ -95,12 +91,10 @@ ENV PORT=8080
WORKDIR /src

RUN corepack enable && corepack prepare --all
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./
COPY . .

RUN yarn install

COPY . .

# Build if we can build it
RUN yarn build

Expand All @@ -118,12 +112,10 @@ ENV PORT=8080
WORKDIR /src

RUN corepack enable && corepack prepare --all
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* .npmrc* ./
COPY . .

RUN yarn install

COPY . .

# Build if we can build it
RUN yarn build

Expand All @@ -135,6 +127,7 @@ RUN echo "\
server { \
listen 8080; \
root /usr/share/nginx/html/static; \
absolute_redirect off; \
location / { \
try_files \$uri /index.html; \
} \
Expand Down
4 changes: 2 additions & 2 deletions internal/python/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ func determineInstallCmd(ctx *pythonPlanContext) string {
}

func determineAptDependencies(ctx *pythonPlanContext) []string {
var deps []string
deps := []string{"build-essential"}

if HasDependency(ctx, "mysqlclient") {
deps = append(deps, "libmariadb-dev", "build-essential")
deps = append(deps, "libmariadb-dev")
}

if HasDependency(ctx, "psycopg2") {
Expand Down
2 changes: 1 addition & 1 deletion internal/python/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func GenerateDockerfile(meta types.PlanMeta) (string, error) {

dockerfile += `WORKDIR /app
RUN apt-get update
RUN apt-get install ` + aptDeps + ` gcc -y
RUN apt-get install -y ` + aptDeps + `
RUN rm -rf /var/lib/apt/lists/*
COPY . .
RUN ` + installCmd + `
Expand Down
2 changes: 2 additions & 0 deletions pkg/zeaburpack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ func Build(opt *BuildOptions) error {
return nil
}

// unused because we are refactoring this part. Ignore this for now.
// nolint:unused
func extractStaticOutput(resultImage string, opt *BuildOptions) error {
copyFiles := `FROM ` + resultImage + `
CMD ["cp", "-r", "/usr/share/nginx/html/static", "/out/"]`
Expand Down
3 changes: 3 additions & 0 deletions tests/python-hnswlib/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import numpy

print("Passed!")
1 change: 1 addition & 0 deletions tests/python-hnswlib/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hnswlib==0.7.0

0 comments on commit 62f09e5

Please sign in to comment.