Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
177ae5a
1
Parent(s):
2b187fd
Minimize requirements
Browse files- Dockerfile +7 -32
- gui/requirements.txt +0 -2
Dockerfile
CHANGED
@@ -12,47 +12,22 @@ FROM python:${PYVERSION}-${BASE_IMAGE}
|
|
12 |
COPY --from=jl /usr/local/julia /usr/local/julia
|
13 |
ENV PATH="/usr/local/julia/bin:${PATH}"
|
14 |
|
15 |
-
# Install
|
16 |
-
RUN
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
libglib2.0-0 \
|
22 |
-
libpython3-dev \
|
23 |
-
libfreetype6-dev \
|
24 |
-
pkg-config \
|
25 |
-
libfontconfig1 \
|
26 |
-
fontconfig \
|
27 |
-
curl \
|
28 |
-
unzip \
|
29 |
-
&& \
|
30 |
-
apt-get clean && \
|
31 |
-
rm -rf /var/lib/apt/lists/*
|
32 |
-
|
33 |
-
# Install IPython and other useful libraries:
|
34 |
-
RUN pip install --no-cache-dir ipython matplotlib
|
35 |
|
36 |
WORKDIR /pysr
|
37 |
|
38 |
-
#
|
39 |
ADD ./requirements.txt /pysr/requirements.txt
|
40 |
RUN pip3 install --no-cache-dir -r /pysr/requirements.txt
|
41 |
|
42 |
-
################################################################################
|
43 |
-
## GUI setup
|
44 |
-
# Install IBM Plex Mono font (so our plots look Gradio-style)
|
45 |
-
RUN mkdir -p /usr/local/share/fonts/IBM_Plex_Mono && \
|
46 |
-
curl -L https://github.com/IBM/plex/releases/download/v6.4.0/IBM-Plex-Mono.zip -o /tmp/IBM_Plex_Mono.zip && \
|
47 |
-
unzip /tmp/IBM_Plex_Mono.zip -d /usr/local/share/fonts/IBM_Plex_Mono && \
|
48 |
-
rm /tmp/IBM_Plex_Mono.zip
|
49 |
-
RUN fc-cache -f -v
|
50 |
ADD ./gui/requirements.txt /pysr/gui/requirements.txt
|
51 |
RUN pip3 install --no-cache-dir -r /pysr/gui/requirements.txt
|
52 |
-
################################################################################
|
53 |
|
54 |
-
# Install PySR:
|
55 |
-
# We do a minimal copy so it doesn't need to rerun at every file change:
|
56 |
ADD ./pyproject.toml /pysr/pyproject.toml
|
57 |
ADD ./setup.py /pysr/setup.py
|
58 |
ADD ./pysr /pysr/pysr
|
|
|
12 |
COPY --from=jl /usr/local/julia /usr/local/julia
|
13 |
ENV PATH="/usr/local/julia/bin:${PATH}"
|
14 |
|
15 |
+
# Install font used for GUI
|
16 |
+
RUN mkdir -p /usr/local/share/fonts/IBM_Plex_Mono && \
|
17 |
+
curl -L https://github.com/IBM/plex/releases/download/v6.4.0/IBM-Plex-Mono.zip -o /tmp/IBM_Plex_Mono.zip && \
|
18 |
+
unzip /tmp/IBM_Plex_Mono.zip -d /usr/local/share/fonts/IBM_Plex_Mono && \
|
19 |
+
rm /tmp/IBM_Plex_Mono.zip
|
20 |
+
RUN fc-cache -f -v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
WORKDIR /pysr
|
23 |
|
24 |
+
# Install all requirements, and then PySR itself
|
25 |
ADD ./requirements.txt /pysr/requirements.txt
|
26 |
RUN pip3 install --no-cache-dir -r /pysr/requirements.txt
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
ADD ./gui/requirements.txt /pysr/gui/requirements.txt
|
29 |
RUN pip3 install --no-cache-dir -r /pysr/gui/requirements.txt
|
|
|
30 |
|
|
|
|
|
31 |
ADD ./pyproject.toml /pysr/pyproject.toml
|
32 |
ADD ./setup.py /pysr/setup.py
|
33 |
ADD ./pysr /pysr/pysr
|
gui/requirements.txt
CHANGED
@@ -1,4 +1,2 @@
|
|
1 |
-
numpy
|
2 |
-
pandas
|
3 |
matplotlib
|
4 |
gradio
|
|
|
|
|
|
|
1 |
matplotlib
|
2 |
gradio
|