Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Docker issue. #63

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
17 changes: 12 additions & 5 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 @@ -180,7 +187,7 @@ dev-benchmark() {
}

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

tmux split-window -v
tmux split-window -v
Expand All @@ -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