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

Instructions to run stanscofi as a Docker container #2

Closed
abhishektiwari opened this issue Nov 11, 2023 · 1 comment
Closed

Instructions to run stanscofi as a Docker container #2

abhishektiwari opened this issue Nov 11, 2023 · 1 comment

Comments

@abhishektiwari
Copy link

Instructions to anyone wanting run stanscofi as docker container.

  1. Add Dockerfile root of the stanscofi repository
# Pull base image.
FROM python:3.8.18-bullseye

# Install.
RUN \
  apt-get update && \
  apt-get -y upgrade && \
  apt-get install -y build-essential && \
  apt-get install -y software-properties-common && \
  apt-get install -y byobu curl git htop man unzip vim wget pip && \
  pip install stanscofi notebook


# Add files.
ADD . /home/stanscofi

# Set environment variables.
ENV HOME /home




# Define working directory.
WORKDIR /home/stanscofi

# Define default command.
CMD ["bash"]

EXPOSE 3000
  1. Build Docker image in root of the stanscofi repository
docker build -t stanscofi .
  1. Run Docker image built in previous step and drop into SSH
docker run -it --expose 3000  -p 3000:3000 stanscofi
  1. Run notebook
cd docs
jupyter notebook --ip 0.0.0.0 --no-browser --allow-root --port 3000
  1. Access notebook at http://127.0.0.1:3000/tree
@abhishektiwari abhishektiwari changed the title Instructions to run stanscofi as docker container Instructions to run stanscofi as a Docker container Nov 11, 2023
@RECeSS-EU-Project
Copy link
Owner

Hi @abhishektiwari, this is a very nice addition to the guidelines to improve stanscofi usability. Thank you very much, I will add the Dockerfile and instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants