Skip to content

Commit

Permalink
Merge pull request ConvLab#11 from ConvLab/add_dockerfile
Browse files Browse the repository at this point in the history
Add dockerfile
  • Loading branch information
sungjinl committed Jun 6, 2019
2 parents b7e9b54 + 05da6b7 commit d28ef4c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM python:3.7

# Install base packages.
RUN apt-get clean && apt-get update && apt-get install -y locales

RUN apt-get update --fix-missing && apt-get install -y \
xvfb \
bzip2 \
ca-certificates \
curl \
gcc \
git \
libc-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
wget \
libevent-dev \
build-essential \
openjdk-8-jdk && \
rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install -r requirements.txt

WORKDIR /root

CMD ["/bin/bash"]
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,51 @@ ConvLab is an open-source multi-domain end-to-end dialog system platform, aiming
</tr>
</table>

## Installation
ConvLab requires Python 3.6.5 or later. Windows is currently not offically supported.

### Installing via pip

#### Setting up a virtual environment

[Connda](https://conda.io/) can be used set up a virtual environment with the
version of Python required for ConvLab. If you already have a Python 3.6 or 3.7
environment you want to use, you can skip to the 'installing via pip' section.

1. [Download and install Conda](https://conda.io/docs/download.html).

2. Create a Conda environment with Python 3.6.5

```bash
conda create -n convlab python=3.6.5
```

3. Activate the Conda environment. You will need to activate the Conda environment in each terminal in which you want to use ConvLab.

```bash
source activate convlab
```

#### Installing the library and dependencies

Installing the library and dependencies is simple using `pip`.

```bash
pip install -r requirements.txt
```

### Installing using Docker

Docker provides more isolation and consistency, and also makes it easy to distribute your environment to a compute cluster.

Once you have [installed Docker](https://docs.docker.com/engine/installation/) just run the following commands to get an environment that will run on either the cpu or gpu.

1. Pull docker </br>
```docker pull convlab/convlab:0.1```

2. Run docker </br>
```docker run -it --rm convlab/convlab:0.1```

## Running ConvLab
Once you've downloaded ConvLab and installed required packages, you can run the command-line interface with the `python run.py` command.

Expand Down

0 comments on commit d28ef4c

Please sign in to comment.