forked from MycroftAI/docker-mycroft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (40 loc) · 1.66 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:18.04
ENV TERM linux
ENV DEBIAN_FRONTEND noninteractive
# Install Server Dependencies for Mycroft
RUN set -x \
&& sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install git python3 python3-pip locales sudo \
&& pip3 install future msm \
# Checkout Mycroft
&& git clone https://github.com/MycroftAI/mycroft-core.git /opt/mycroft \
&& cd /opt/mycroft \
&& mkdir /opt/mycroft/skills \
# git fetch && git checkout dev && \ this branch is now merged to master
&& CI=true /opt/mycroft/./dev_setup.sh --allow-root -sm \
&& mkdir /opt/mycroft/scripts/logs \
&& touch /opt/mycroft/scripts/logs/mycroft-bus.log \
&& touch /opt/mycroft/scripts/logs/mycroft-voice.log \
&& touch /opt/mycroft/scripts/logs/mycroft-skills.log \
&& touch /opt/mycroft/scripts/logs/mycroft-audio.log \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl https://forslund.github.io/mycroft-desktop-repo/mycroft-desktop.gpg.key | apt-key add - 2> /dev/null && \
echo "deb http://forslund.github.io/mycroft-desktop-repo bionic main" > /etc/apt/sources.list.d/mycroft-desktop.list
RUN apt-get update && apt-get install -y mimic
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
WORKDIR /opt/mycroft
COPY startup.sh /opt/mycroft
ENV PYTHONPATH $PYTHONPATH:/mycroft/ai
RUN echo "PATH=$PATH:/opt/mycroft/bin" >> $HOME/.bashrc \
&& echo "source /opt/mycroft/.venv/bin/activate" >> $HOME/.bashrc
RUN chmod +x /opt/mycroft/start-mycroft.sh \
&& chmod +x /opt/mycroft/startup.sh
EXPOSE 8181
ENTRYPOINT "/opt/mycroft/startup.sh"