Release CQ customizer (#559)
* Switched to Miniconda image * Update cad endpoint url and some minor tweaks Co-authored-by: Jeremy Wright <wrightjmf@gmail.com> Co-authored-by: Jeremy Wright <wrightjmf@gmail.com>
This commit was merged in pull request #559.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM public.ecr.aws/lts/ubuntu:20.04_stable
|
FROM continuumio/miniconda3
|
||||||
ENV PATH="/root/miniconda3/bin:${PATH}"
|
ENV PATH="/root/miniconda3/bin:${PATH}"
|
||||||
ARG PATH="/root/miniconda3/bin:${PATH}"
|
ARG PATH="/root/miniconda3/bin:${PATH}"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
@@ -38,11 +38,6 @@ COPY package*.json /var/task/
|
|||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm install aws-lambda-ric@1.0.0
|
RUN npm install aws-lambda-ric@1.0.0
|
||||||
|
|
||||||
# Install Miniconda
|
|
||||||
RUN wget \
|
|
||||||
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
|
|
||||||
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
|
|
||||||
&& rm -f Miniconda3-latest-Linux-x86_64.sh
|
|
||||||
RUN conda --version
|
RUN conda --version
|
||||||
|
|
||||||
# Install CadQuery
|
# Install CadQuery
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const runCQ = async ({
|
|||||||
const stlPath = `/tmp/${tempFile}/output.stl`
|
const stlPath = `/tmp/${tempFile}/output.stl`
|
||||||
const customizerPath = `/tmp/${tempFile}/customizer.json`
|
const customizerPath = `/tmp/${tempFile}/customizer.json`
|
||||||
const command = [
|
const command = [
|
||||||
`./cq-cli/cq-cli.py`,
|
`/var/task/cq-cli/cq-cli.py`,
|
||||||
`--codec stl`,
|
`--codec stl`,
|
||||||
`--infile /tmp/${tempFile}/main.py`,
|
`--infile /tmp/${tempFile}/main.py`,
|
||||||
`--outfile ${stlPath}`,
|
`--outfile ${stlPath}`,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { CadhubParams } from 'src/components/Customizer/customizerConverter'
|
|||||||
|
|
||||||
export const lambdaBaseURL =
|
export const lambdaBaseURL =
|
||||||
process.env.CAD_LAMBDA_BASE_URL ||
|
process.env.CAD_LAMBDA_BASE_URL ||
|
||||||
'https://oxt2p7ddgj.execute-api.us-east-1.amazonaws.com/prod'
|
'https://2inlbple1b.execute-api.us-east-1.amazonaws.com/prod2'
|
||||||
|
|
||||||
export const stlToGeometry = (url) =>
|
export const stlToGeometry = (url) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user