Add Text2Image UI, UI tests, Readme, and Docker support (#927)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
26
Text2Image/ui/docker/Dockerfile
Normal file
26
Text2Image/ui/docker/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Use node 20.11.1 as the base image
|
||||
FROM node:20.11.1
|
||||
|
||||
# Update package manager and install Git
|
||||
RUN apt-get update -y && apt-get install -y git
|
||||
|
||||
# Copy the front-end code repository
|
||||
COPY svelte /home/user/svelte
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /home/user/svelte
|
||||
|
||||
# Install front-end dependencies
|
||||
RUN npm install
|
||||
|
||||
# Build the front-end application
|
||||
RUN npm run build
|
||||
|
||||
# Expose the port of the front-end application
|
||||
EXPOSE 5173
|
||||
|
||||
# Run the front-end application in preview mode
|
||||
CMD ["npm", "run", "preview", "--", "--port", "5173", "--host", "0.0.0.0"]
|
||||
Reference in New Issue
Block a user