Skip to content

Commit

Permalink
First Docker Environment commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaltz committed Apr 30, 2024
1 parent 9ec75ee commit ea374bd
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:22.04

ENV TZ=America/Recife
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update
RUN apt-get install -y build-essential cmake neovim nano wget curl tar git python3-pip

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

RUN echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc && \
echo "export MLC_LLM_HOME=/volume" >> ~/.bashrc && \
echo "export PYTHONPATH=/volume/python:$PYTHONPATH" >> ~/.bashrc

CMD ["/bin/bash"]

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Clone this repository recursively

```bash
git clone --recursive git@github.com:TIC-13/mlc-llm.git
```

---

[discord-url]: https://discord.gg/9Xpy2HGBuD

# MLC LLM
Expand Down
9 changes: 9 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

rm -rf ${MLC_LLM_HOME}/build/
mkdir -p ${MLC_LLM_HOME}/build/
cd ${MLC_LLM_HOME}/build/

python3 ../cmake/gen_cmake_config.py

cmake .. && cmake --build . --parallel $(nproc) && cd ..
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:

mlc_image:

build:
context: .
dockerfile: Dockerfile

volumes:
- type: bind
source: ./
target: /volume
bind:
propagation: shared

container_name: mlc_container


#####################################################################
# To run the docker compose FOR THE FIRST TIME use these commands
# docker compose up --build
#
# To run the docker compose AFTER THE FIRST TIME use these commands
# docker compose run --rm mlc_image /bin/bash
#####################################################################

0 comments on commit ea374bd

Please sign in to comment.