add docker sdk
Browse files- Dockerfile +41 -0
- README.md +1 -3
Dockerfile
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Python 3.10-slim to meet esm's requirements
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set up time zone
|
5 |
+
ENV TZ=UTC
|
6 |
+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
7 |
+
|
8 |
+
# Install system dependencies
|
9 |
+
RUN apt-get update && apt-get install -y \
|
10 |
+
wget \
|
11 |
+
git \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
+
# Set up a new user named "user" with user ID 1000
|
15 |
+
RUN useradd -m -u 1000 user
|
16 |
+
|
17 |
+
# Switch to the "user" user
|
18 |
+
USER user
|
19 |
+
|
20 |
+
# Set home to the user's home directory
|
21 |
+
ENV HOME=/home/user \
|
22 |
+
PATH=/home/user/.local/bin:$PATH
|
23 |
+
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
27 |
+
COPY --chown=user . $HOME/app
|
28 |
+
|
29 |
+
# Install Python dependencies
|
30 |
+
RUN pip install --upgrade pip
|
31 |
+
RUN pip install -r requirements.txt
|
32 |
+
|
33 |
+
# # Install ESM
|
34 |
+
# RUN pip install esm
|
35 |
+
|
36 |
+
# Simulate NVIDIA driver for Hugging Face Spaces
|
37 |
+
ENV NVIDIA_VISIBLE_DEVICES=all
|
38 |
+
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
39 |
+
|
40 |
+
# Set the command to run the Gradio app
|
41 |
+
CMD ["python", "main.py"]
|
README.md
CHANGED
@@ -3,11 +3,9 @@ title: Conformity Protein Dynamics
|
|
3 |
emoji: 🧬🪬
|
4 |
colorFrom: indigo
|
5 |
colorTo: purple
|
6 |
-
sdk:
|
7 |
-
app_file: app.py
|
8 |
pinned: true
|
9 |
license: mit
|
10 |
-
short_description: 'use the ESM3 model to predict protein structures'
|
11 |
---
|
12 |
|
13 |
To create a virtual environment on a Windows machine and run your Gradio app (`app.py`) after installing the dependencies listed in `requirements.txt`, follow these steps:
|
|
|
3 |
emoji: 🧬🪬
|
4 |
colorFrom: indigo
|
5 |
colorTo: purple
|
6 |
+
sdk: docker
|
|
|
7 |
pinned: true
|
8 |
license: mit
|
|
|
9 |
---
|
10 |
|
11 |
To create a virtual environment on a Windows machine and run your Gradio app (`app.py`) after installing the dependencies listed in `requirements.txt`, follow these steps:
|