Spaces:
Sleeping
Sleeping
Download app.py from gahugo2020/restrict_Smart_Grad_UI: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/spaces/gahugo2020/restrict_Smart_Grad_UI/resolve/main/app.py
- Command line
-
hf download hf://spaces/gahugo2020/restrict_Smart_Grad_UI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/gahugo2020/restrict_Smart_Grad_UI/resolve/main/app.py
611 Bytes
| FROM tomcat:9.0-jdk11 | |
| # Install tools | |
| RUN apt-get update && \ | |
| apt-get install -y git maven && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /build | |
| # Clone at build time using ENV (set in HF Space secrets) | |
| ARG GITHUB_PAT | |
| RUN git clone --depth 1 \ | |
| https://${GITHUB_PAT}@github.com/pgacirane/Smart_Grad_UI.git app | |
| # Build WAR | |
| RUN cd app && mvn clean package -DskipTests -q | |
| # Deploy to Tomcat ROOT | |
| RUN cp app/target/*.war /usr/local/tomcat/webapps/ROOT.war | |
| # Change Tomcat port to 7860 | |
| RUN sed -i 's/port="8080"/port="7860"/' \ | |
| /usr/local/tomcat/conf/server.xml | |
| EXPOSE 7860 | |
| CMD ["catalina.sh", "run"] |