Skip to content

Commit

Permalink
Added doc and disabled interactive mode for ghc
Browse files Browse the repository at this point in the history
  • Loading branch information
JianyiCheng committed Jul 3, 2023
1 parent be3285d commit f6f1c9b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,23 @@ RUN echo "dev-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER dev-user

# Install Python packages
ENV PATH="${PATH}:/home/dev-user/.local/bin"
ENV PATH="/home/dev-user/.ghcup/bin:${PATH}:/home/dev-user/.local/bin"
RUN pip3 install --user --upgrade pip \
&& pip3 install black colorlog toml tabulate isort
# Install GHC
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | \
BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
BOOTSTRAP_HASKELL_GHC_VERSION=latest \
BOOTSTRAP_HASKELL_CABAL_VERSION=latest \
BOOTSTRAP_HASKELL_INSTALL_STACK=1 \
BOOTSTRAP_HASKELL_INSTALL_HLS=1 \
BOOTSTRAP_HASKELL_ADJUST_BASHRC=P sh

# Add environment variables
RUN printf "\
\nexport LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:\$LIBRARY_PATH \
\n# Basic PATH setup \
\nexport PATH=/workspace/scripts:/home/dev-user/.local/bin:\$PATH \
\nexport PATH=/workspace/scripts:/home/dev-user/.local/bin:\$PATH:/home/dev-user/.ghcup/bin \
\n# Thread setup \
\nexport nproc=\$(grep -c ^processor /proc/cpuinfo) \
\n# Terminal color... \
Expand Down
16 changes: 16 additions & 0 deletions Docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Start with Docker

You can try SIMTight in Docker, which has installed all the prerequisites.

To build the Docker image from scratch:

```sh
cd SIMTight; make build-docker
```
This might take a long time for the first time.

To enter the Docker container:
```sh
cd SIMTight; make shell
```
This brings you to the working directory `/workspace` and you should be able to try out all the commands directly!

0 comments on commit f6f1c9b

Please sign in to comment.