pradelf commited on
Commit
f94bff7
·
1 Parent(s): 072fc4c

migration from team project

Browse files
Files changed (4) hide show
  1. Dockerfile +45 -0
  2. README.md +5 -8
  3. image.png +0 -0
  4. requirements.txt +10 -0
Dockerfile ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build from a LINUX lightweight version of Anaconda
2
+ FROM continuumio/miniconda3
3
+
4
+ # Update packages and install nano unzip and curl
5
+ RUN apt-get update
6
+ RUN apt-get install nano unzip curl -y
7
+
8
+ # Install AWS cli - Necessary since we are going to interact with S3
9
+ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
10
+ RUN unzip awscliv2.zip
11
+ RUN ./aws/install
12
+
13
+ # THIS IS SPECIFIC TO HUGGINFACE
14
+ # We create a new user named "user" with ID of 1000
15
+ RUN useradd -m -u 1000 user
16
+ # We switch from "root" (default user when creating an image) to "user"
17
+ USER user
18
+ # We set two environmnet variables
19
+ # so that we can give ownership to all files in there afterwards
20
+ # we also add /home/user/.local/bin in the $PATH environment variable
21
+ # PATH environment variable sets paths to look for installed binaries
22
+ # We update it so that Linux knows where to look for binaries if we were to install them with "user".
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH
25
+
26
+ # We set working directory to $HOME/app (<=> /home/user/app)
27
+ WORKDIR $HOME/app
28
+
29
+ # Copy all local files to /home/user/app with "user" as owner of these files
30
+ # Always use --chown=user when using HUGGINGFACE to avoid permission errors
31
+ COPY --chown=user . $HOME/app
32
+
33
+ # Copy and install dependencies
34
+ COPY requirements.txt /requirements.txt
35
+ RUN pip install -r /requirements.txt
36
+
37
+ # Launch mlflow server
38
+ # Here we chose to have $PORT as environment variable but you could have hard coded 7860
39
+ # If you are sure to push into production
40
+ # Advantage to use an env variable is that your code is more portable if you were to deploy to another
41
+ # type of server
42
+ CMD mlflow server -p $PORT \
43
+ --host 0.0.0.0 \
44
+ --backend-store-uri $BACKEND_STORE_URI \
45
+ --default-artifact-root $ARTIFACT_STORE_URI
README.md CHANGED
@@ -1,12 +1,9 @@
1
  ---
2
- title: Oasis Mlflow
3
- emoji: 🐠
4
- colorFrom: purple
5
- colorTo: red
6
  sdk: docker
7
  pinned: false
8
- license: mit
9
- short_description: MLFLOW server for Oasis Project
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: oasis-mlflow
3
+ emoji: 🚀
4
+ colorFrom: gray
5
+ colorTo: yellow
6
  sdk: docker
7
  pinned: false
 
 
8
  ---
9
+ # oasis-mlflow
 
image.png ADDED
requirements.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ boto3
2
+ pandas
3
+ gunicorn
4
+ streamlit
5
+ scikit-learn
6
+ matplotlib
7
+ seaborn
8
+ plotly
9
+ mlflow
10
+ psycopg2-binary