Skip to content

Commit

Permalink
Merge pull request #63 from CURENT/docker-agvis-bug
Browse files Browse the repository at this point in the history
Fixed Docker issue.
  • Loading branch information
zmalkmus authored Dec 15, 2023
2 parents 7301fd2 + 51c2c92 commit edc350d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Start with a base Python 3.10 image from the Debian Buster distribution
FROM python:3.10-buster AS base
ARG BRANCH_NAME

# Switch to the root user and set the working directory to /root
USER root
Expand All @@ -22,9 +23,6 @@ RUN apt update \
RUN python3 -m pip install \
kvxopt \
git+https://github.com/cuihantao/andes.git@develop \
--no-cache-dir \
&& python3 -m pip install \
git+https://github.com/CURENT/agvis.git@master \
--no-cache-dir

# Create a new user named 'cui' and a work directory
Expand All @@ -49,6 +47,11 @@ RUN git clone https://github.com/CURENT/dime.git && \
rm -rf dime \
&& rm -rf /tmp/dime

RUN git clone --single-branch --branch ${BRANCH_NAME} https://github.com/CURENT/agvis.git && \
cd agvis && \
python3 -m pip install -e . && \
cd ..

# Switch to the 'cui' user and set the working directory to the new user's work directory
USER cui
WORKDIR /home/cui/work
Expand Down
15 changes: 11 additions & 4 deletions go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ piptrustedhost=
[ -f env.sh ] && . env.sh

build() {
# Set Agvis Branch
local BRANCH_NAME=master
if [ "$1" ]; then
BRANCH_NAME=$1
fi

# Clone ANDES and DiME if they don't exist
if [ ! -d "../andes" ]; then
echo "Cloning ANDES repository..."
Expand All @@ -41,6 +47,7 @@ build() {
${target:+--target $target} \
${pipindex:+--build-arg PIP_INDEX_URL=$pipindex} \
${piptrustedhost:+--build-arg PIP_TRUSTED_HOST=$piptrustedhost} \
--build-arg BRANCH_NAME=$BRANCH_NAME \
-t $tag .
}

Expand Down Expand Up @@ -201,11 +208,11 @@ dime-cygwin() {
####################################################################################################

# dev-cygwin() {
# google-chrome --incognito http://localhost:8810/ 2> /dev/null > /dev/null &!
# google-chrome --incognito http://localhost:8810/ 2> /dev/null > /dev/null &

# mintty --exec "docker run --rm -t -v C:/cygwin64/`pwd`/static:/srv -p 8810:8810 $tag python3 -m http.server -d /srv $((port+0))" &!
# mintty --exec "docker run --rm -t -p 5000:5000 -p 8818:8818 $tag dime -vv -l tcp:5000 -l ws:$((port+8))" &!
# #mintty --exec "docker run --rm -t $tag andes -v 10 run /home/cui/wecc_vis.xlsx --dime tcp://127.0.0.1:5000 -r tds" &!
# mintty --exec "docker run --rm -t -v C:/cygwin64/`pwd`/static:/srv -p 8810:8810 $tag python3 -m http.server -d /srv $((port+0))" &
# mintty --exec "docker run --rm -t -p 5000:5000 -p 8818:8818 $tag dime -vv -l tcp:5000 -l ws:$((port+8))" &
# #mintty --exec "docker run --rm -t $tag andes -v 10 run /home/cui/wecc_vis.xlsx --dime tcp://127.0.0.1:5000 -r tds" &
# }

# http-cygwin() {
Expand Down

0 comments on commit edc350d

Please sign in to comment.