File size: 1,170 Bytes
ccef048
 
111dcf6
 
4e3f771
111dcf6
 
9e66fb2
a3f2a0a
ec2feb3
ffb5c9f
 
ec2feb3
111dcf6
 
 
 
 
 
 
 
 
c967d74
 
 
904bbb4
b494734
 
aaacdb2
b494734
c967d74
b494734
c967d74
 
ccef048
111dcf6
ccef048
99d06a3
55f9d07
111dcf6
 
 
 
 
55f9d07
2a5a2cc
4e3f771
9e66fb2
 
bba60a5
b025941
2a5a2cc
6db9611
29c862f
511d968
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
50
51
52
53
54
55
FROM python:3.9

# RUN useradd -rm -d /code/ubuntu -s /bin/bash -g root -G sudo -u 1001 ubuntu
# USER ubuntu

WORKDIR /code
RUN chmod 777 /code
RUN echo SPACE_AUTHOR_NAME

# Install node >= 18.0.0 and npm
# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
# RUN apt-get install -y nodejs

RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME

RUN git clone https://github.com/hazyresearch/meerkat.git
WORKDIR $HOME/meerkat/
RUN git checkout karan/deploy

# WORKDIR $HOME/meerkat/meerkat/interactive/app/
# RUN npm install

# WORKDIR $HOME/meerkat/
RUN pip install --upgrade .

# PUT THIS BACK
# RUN pip install meerkat-ml

COPY --chown=user . $HOME/


# Set env variables
RUN mkdir $HOME/logs
RUN chmod 777 $HOME/logs
ENV MEERKAT_LOG_DIR=$HOME/logs
RUN chmod 777 $HOME/
ENV MEERKAT_CONFIG=$HOME/config.yaml

COPY --chown=user ./tutorial.py $HOME/tutorial.py



RUN mk run $HOME/tutorial.py --host 0.0.0.0 --api-port 7860

WORKDIR $HOME
# CMD ["uvicorn", "tutorial:page", "--host", "0.0.0.0", "--port", "7860"]

# CMD ["mk", "run", "/home/user/tutorial.py", "--host", "0.0.0.0", "--api-port", "7860"]