Spaces:
Runtime error
Runtime error
Add basic app and basic Dockerfile
Browse files- Dockerfile +27 -0
- README.md +2 -1
- app.py +2 -0
- basic_environment.yml +12 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:latest
|
2 |
+
|
3 |
+
RUN apt-get update -y
|
4 |
+
RUN apt-get install -y sudo wget curl nano git tar bzip2 && rm -rf /var/lib/apt/lists/*
|
5 |
+
|
6 |
+
# Build is significantly faster with micromamba, rather than conda
|
7 |
+
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-aarch64/latest | tar -xvj bin/micromamba
|
8 |
+
RUN ./bin/micromamba shell init -s bash -p ~/micromamba # this writes to your .bashrc file
|
9 |
+
RUN ./bin/micromamba --version
|
10 |
+
|
11 |
+
# Create conda environment first
|
12 |
+
# This is time-consuming and don't want to reproduce it often
|
13 |
+
COPY ./basic_environment.yml /
|
14 |
+
|
15 |
+
RUN ./bin/micromamba env create --file basic_environment.yml && ./bin/micromamba clean -afy
|
16 |
+
RUN ./bin/micromamba list > spec-file.txt
|
17 |
+
RUN echo "micromamba activate basic" >> ~/.bashrc
|
18 |
+
|
19 |
+
COPY . /app
|
20 |
+
|
21 |
+
WORKDIR /app
|
22 |
+
|
23 |
+
EXPOSE 8501
|
24 |
+
|
25 |
+
# Entrypoint script which activates conda environment
|
26 |
+
ENTRYPOINT ["/bin/micromamba", "run", "-n", "basic", "streamlit", "run", "app.py"]
|
27 |
+
# ENTRYPOINT ["./entrypoint.sh"]
|
README.md
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: π
|
4 |
colorFrom: pink
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.28.0
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
1 |
---
|
2 |
+
title: DiffDock-Pocket Test
|
3 |
emoji: π
|
4 |
colorFrom: pink
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.28.0
|
8 |
+
port: 8501
|
9 |
app_file: app.py
|
10 |
pinned: false
|
11 |
---
|
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
x = st.slider('Select a value')
|
|
|
1 |
+
# import torch
|
2 |
+
|
3 |
import streamlit as st
|
4 |
|
5 |
x = st.slider('Select a value')
|
basic_environment.yml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: basic
|
2 |
+
channels:
|
3 |
+
- nvidia
|
4 |
+
- pytorch
|
5 |
+
- defaults
|
6 |
+
- conda-forge
|
7 |
+
dependencies:
|
8 |
+
- python=3.9.17
|
9 |
+
- pip=23.3.1
|
10 |
+
- pytorch=1.13.1
|
11 |
+
- pip:
|
12 |
+
- streamlit==1.28
|