Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
754d45b
1
Parent(s):
a300bd3
Remove unused parts of gui
Browse files- gui/.gitignore +0 -1
- gui/.pre-commit-config.yaml +0 -33
- gui/Dockerfile +0 -64
gui/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*.csv*
|
|
|
|
gui/.pre-commit-config.yaml
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
repos:
|
2 |
-
# General linting
|
3 |
-
- repo: https://github.com/pre-commit/pre-commit-hooks
|
4 |
-
rev: v4.5.0
|
5 |
-
hooks:
|
6 |
-
- id: trailing-whitespace
|
7 |
-
- id: end-of-file-fixer
|
8 |
-
- id: check-yaml
|
9 |
-
- id: check-added-large-files
|
10 |
-
# General formatting
|
11 |
-
- repo: https://github.com/psf/black
|
12 |
-
rev: 23.12.1
|
13 |
-
hooks:
|
14 |
-
- id: black
|
15 |
-
- id: black-jupyter
|
16 |
-
exclude: pysr/test/test_nb.ipynb
|
17 |
-
# Stripping notebooks
|
18 |
-
- repo: https://github.com/kynan/nbstripout
|
19 |
-
rev: 0.6.1
|
20 |
-
hooks:
|
21 |
-
- id: nbstripout
|
22 |
-
exclude: pysr/test/test_nb.ipynb
|
23 |
-
# Unused imports
|
24 |
-
- repo: https://github.com/hadialqattan/pycln
|
25 |
-
rev: "v2.4.0"
|
26 |
-
hooks:
|
27 |
-
- id: pycln
|
28 |
-
# Sorted imports
|
29 |
-
- repo: https://github.com/PyCQA/isort
|
30 |
-
rev: "5.13.2"
|
31 |
-
hooks:
|
32 |
-
- id: isort
|
33 |
-
additional_dependencies: [toml]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gui/Dockerfile
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
FROM julia:1.10.0 AS jl
|
2 |
-
FROM python:3.12
|
3 |
-
|
4 |
-
COPY --from=jl /usr/local/julia /usr/local/julia
|
5 |
-
ENV PATH="/usr/local/julia/bin:${PATH}"
|
6 |
-
|
7 |
-
RUN apt-get update && \
|
8 |
-
apt-get install -y --no-install-recommends \
|
9 |
-
build-essential \
|
10 |
-
git \
|
11 |
-
libgl1-mesa-glx \
|
12 |
-
libglib2.0-0 \
|
13 |
-
libpython3-dev \
|
14 |
-
libfreetype6-dev \
|
15 |
-
pkg-config \
|
16 |
-
libfontconfig1 \
|
17 |
-
fontconfig \
|
18 |
-
curl \
|
19 |
-
unzip \
|
20 |
-
&& \
|
21 |
-
apt-get clean && \
|
22 |
-
rm -rf /var/lib/apt/lists/*
|
23 |
-
|
24 |
-
# Install IBM Plex Mono font (so our plots look Gradio-style)
|
25 |
-
RUN mkdir -p /usr/local/share/fonts/IBM_Plex_Mono && \
|
26 |
-
curl -L https://github.com/IBM/plex/releases/download/v6.4.0/IBM-Plex-Mono.zip -o /tmp/IBM_Plex_Mono.zip && \
|
27 |
-
unzip /tmp/IBM_Plex_Mono.zip -d /usr/local/share/fonts/IBM_Plex_Mono && \
|
28 |
-
rm /tmp/IBM_Plex_Mono.zip
|
29 |
-
RUN fc-cache -f -v
|
30 |
-
|
31 |
-
WORKDIR /code
|
32 |
-
|
33 |
-
COPY ./requirements.txt /code/requirements.txt
|
34 |
-
|
35 |
-
# Set up a new user named "user" with user ID 1000
|
36 |
-
RUN useradd -m -u 1000 user
|
37 |
-
# Switch to the "user" user
|
38 |
-
USER user
|
39 |
-
WORKDIR /home/user/
|
40 |
-
# Set home to the user's home directory
|
41 |
-
ENV HOME=/home/user
|
42 |
-
ENV PATH=/home/user/.local/bin:$PATH
|
43 |
-
|
44 |
-
RUN python -m venv /home/user/.venv
|
45 |
-
|
46 |
-
# Install Python dependencies in a virtual environment
|
47 |
-
RUN /home/user/.venv/bin/python -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
48 |
-
|
49 |
-
# Install and pre-compile Julia dependencies,
|
50 |
-
# including the Bumper extension
|
51 |
-
RUN /home/user/.venv/bin/python -c "import pysr"
|
52 |
-
RUN /home/user/.venv/bin/python -c "import pysr; pysr.PySRRegressor(bumper=True, verbosity=0, progress=False, max_evals=1).fit([[1]], [1])"
|
53 |
-
|
54 |
-
WORKDIR /home/user/app
|
55 |
-
COPY --chown=user . $HOME/app
|
56 |
-
|
57 |
-
EXPOSE 7860
|
58 |
-
ENV GRADIO_ALLOW_FLAGGING=never \
|
59 |
-
GRADIO_NUM_PORTS=1 \
|
60 |
-
GRADIO_SERVER_NAME=0.0.0.0 \
|
61 |
-
GRADIO_THEME=huggingface \
|
62 |
-
SYSTEM=spaces
|
63 |
-
|
64 |
-
CMD ["/bin/bash", "-l", "-c", "/home/user/.venv/bin/python /home/user/app/app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|