RyanGutenkunst commited on
Commit
6494d64
·
1 Parent(s): c597746

Now try using Docker

Browse files
Files changed (4) hide show
  1. Dockerfile +29 -0
  2. README.md +1 -3
  3. environment.yml +0 -11
  4. requirements.txt +2 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:latest
5
+
6
+ WORKDIR /code
7
+
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ RUN apt-get update && apt-get install -y vcftools
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
+
13
+ # Set up a new user named "user" with user ID 1000
14
+ RUN useradd -m -u 1000 user
15
+
16
+ # Switch to the "user" user
17
+ USER user
18
+
19
+ # Set home to the user's home directory
20
+ ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
22
+
23
+ # Set the working directory to the user's home directory
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
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,9 +3,7 @@ title: Sweep Detection Dpi
3
  emoji: 👁
4
  colorFrom: yellow
5
  colorTo: purple
6
- sdk: gradio
7
- sdk_version: 5.39.0
8
- app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
  short_description: Sweep Detection using Tajima's D and Nucleotide Diversity
 
3
  emoji: 👁
4
  colorFrom: yellow
5
  colorTo: purple
6
+ sdk: docker
 
 
7
  pinned: false
8
  license: apache-2.0
9
  short_description: Sweep Detection using Tajima's D and Nucleotide Diversity
environment.yml DELETED
@@ -1,11 +0,0 @@
1
- name: my_space_env
2
- channels:
3
- - conda-forge
4
- - defaults
5
- dependencies:
6
- - python
7
- - vcftools
8
- - pip
9
- - pip:
10
- - gradio
11
- - pandas
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio
2
+ pandas