-
Notifications
You must be signed in to change notification settings - Fork 463
/
Dockerfile
38 lines (27 loc) · 941 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM continuumio/miniconda3
MAINTAINER Gilles Bodart <[email protected]>
# Install build-essential (compiler and development tools)
RUN apt-get update && \
apt-get install -y build-essential && \
rm -rf /var/lib/apt/lists/*
RUN conda create -n env python=3.8
RUN echo "source activate env" > ~/.bashrc
ENV PATH /opt/conda/envs/env/bin:$PATH
# Set the working directory to /app
WORKDIR /app
# Copy the local laser-encoders repository
COPY laser_encoders /app/laser_encoders
COPY pyproject.toml /app/pyproject.toml
RUN pip install --upgrade pip
RUN pip install -e .
RUN pip install Flask==2.3.3 Requests==2.31.0
# Define the argument for language
ARG langs="eng_Latn"
# Download language models for each specified language
RUN for lang in $langs; do \
python -m laser_encoders.download_models --lang=$lang; \
done
# Open the port 80
EXPOSE 80
COPY docker/app.py /app/app.py
CMD ["/bin/bash"]