mirror of
https://github.com/Toumash/mlflow-docker
synced 2025-11-04 15:19:21 +01:00
removes old files
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
FROM python:3.7.0
|
||||
LABEL maintainer="Albert Franzi"
|
||||
|
||||
ENV MLFLOW_HOME /opt/mlflow
|
||||
ENV SERVER_PORT 5000
|
||||
ENV SERVER_HOST 0.0.0.0
|
||||
ENV FILE_STORE ${MLFLOW_HOME}/fileStore
|
||||
ENV ARTIFACT_STORE ${MLFLOW_HOME}/artifactStore
|
||||
|
||||
RUN pip install mlflow && \
|
||||
mkdir -p ${MLFLOW_HOME}/scripts && \
|
||||
mkdir -p ${FILE_STORE} && \
|
||||
mkdir -p ${ARTIFACT_STORE}
|
||||
|
||||
COPY scripts/run.sh ${MLFLOW_HOME}/scripts/run.sh
|
||||
RUN chmod +x ${MLFLOW_HOME}/scripts/run.sh
|
||||
|
||||
EXPOSE ${SERVER_PORT}/tcp
|
||||
|
||||
VOLUME ["${MLFLOW_HOME}/scripts/", "${FILE_STORE}", "${ARTIFACT_STORE}"]
|
||||
|
||||
WORKDIR ${MLFLOW_HOME}
|
||||
|
||||
ENTRYPOINT ["./scripts/run.sh"]
|
||||
@@ -1,35 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sftp:
|
||||
image: atmoz/sftp
|
||||
#volumes:
|
||||
# - <host-dir>/upload:/home/foo/upload
|
||||
ports:
|
||||
- "2222:22"
|
||||
command: ftpuser:ftppass:::0
|
||||
networks:
|
||||
- A
|
||||
database:
|
||||
container_name: pg_mlflow
|
||||
image: postgres:13
|
||||
environment:
|
||||
- POSTGRES_USER=pgsql
|
||||
- POSTGRES_PASSWORD=pg_password
|
||||
- POSTGRES_DB=mlflow
|
||||
networks:
|
||||
- A
|
||||
tracker:
|
||||
container_name: tracker_mlflow
|
||||
image: tracker_ml
|
||||
build:
|
||||
context: ./mlflow
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5000:5000"
|
||||
networks:
|
||||
- A
|
||||
|
||||
entrypoint: mlflow server --default-artifact-root sftp://ftpuser:ftppass@localhost:2222 -h 0.0.0.0
|
||||
networks:
|
||||
A:
|
||||
driver: bridge
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
mlflow server \
|
||||
--file-store $FILE_STORE \
|
||||
--default-artifact-root $ARTIFACT_STORE \
|
||||
--host $SERVER_HOST \
|
||||
--port $SERVER_PORT
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
export MLFLOW_TRACKING_UI=http://localhost:5000
|
||||
mlflow run git@github.com:databricks/mlflow-example.git -P alpha=0.5 --no-conda
|
||||
46
aws.js
46
aws.js
@@ -1,46 +0,0 @@
|
||||
const AWS = require('aws-sdk')
|
||||
require('dotenv').config()
|
||||
|
||||
const credentials = {
|
||||
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
||||
secretAccessKey: process.env.AWS_SECRET_KEY,
|
||||
}
|
||||
|
||||
const useLocal = process.env.NODE_ENV !== 'production'
|
||||
|
||||
const bucketName = process.env.AWS_BUCKET_NAME
|
||||
|
||||
const s3client = new AWS.S3({
|
||||
credentials,
|
||||
/**
|
||||
* When working locally, we'll use the Localstack endpoints. This is the one for S3.
|
||||
* A full list of endpoints for each service can be found in the Localstack docs.
|
||||
*/
|
||||
endpoint: useLocal ? 'http://localhost:4572' : undefined,
|
||||
/**
|
||||
* Including this option gets localstack to more closely match the defaults for
|
||||
* live S3. If you omit this, you will need to add the bucketName to the `Key`
|
||||
* property in the upload function below.
|
||||
*
|
||||
* see: https://github.com/localstack/localstack/issues/1180
|
||||
*/
|
||||
s3ForcePathStyle: true,
|
||||
})
|
||||
|
||||
|
||||
const uploadFile = async (data, fileName) =>
|
||||
new Promise((resolve) => {
|
||||
s3client.upload(
|
||||
{
|
||||
Bucket: bucketName,
|
||||
Key: fileName,
|
||||
Body: data,
|
||||
},
|
||||
(err, response) => {
|
||||
if (err) throw err
|
||||
resolve(response)
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
module.exports = uploadFile
|
||||
105
package-lock.json
generated
105
package-lock.json
generated
@@ -1,105 +0,0 @@
|
||||
{
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"aws-sdk": {
|
||||
"version": "2.738.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.738.0.tgz",
|
||||
"integrity": "sha512-oO1odRT4DGssivoP6lHO3yB6I+5sU0uqpj6UJ0kS5wrHQ9J9EGrictLVKA9y6XhN0sNW+XPNLD9jMMY/A+gXWA==",
|
||||
"requires": {
|
||||
"buffer": "4.9.2",
|
||||
"events": "1.1.1",
|
||||
"ieee754": "1.1.13",
|
||||
"jmespath": "0.15.0",
|
||||
"querystring": "0.2.0",
|
||||
"sax": "1.2.1",
|
||||
"url": "0.10.3",
|
||||
"uuid": "3.3.2",
|
||||
"xml2js": "0.4.19"
|
||||
}
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
||||
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
|
||||
},
|
||||
"buffer": {
|
||||
"version": "4.9.2",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
|
||||
"integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
|
||||
"requires": {
|
||||
"base64-js": "^1.0.2",
|
||||
"ieee754": "^1.1.4",
|
||||
"isarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
|
||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
|
||||
},
|
||||
"events": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
|
||||
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"jmespath": {
|
||||
"version": "0.15.0",
|
||||
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
|
||||
"integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc="
|
||||
},
|
||||
"punycode": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
||||
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
|
||||
},
|
||||
"querystring": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
||||
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
||||
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
||||
},
|
||||
"url": {
|
||||
"version": "0.10.3",
|
||||
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
|
||||
"integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
|
||||
"requires": {
|
||||
"punycode": "1.3.2",
|
||||
"querystring": "0.2.0"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.19",
|
||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
|
||||
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
|
||||
"requires": {
|
||||
"sax": ">=0.6.0",
|
||||
"xmlbuilder": "~9.0.1"
|
||||
}
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "9.0.7",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
|
||||
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const uploadFile = require('./aws')
|
||||
|
||||
const testUpload = () => {
|
||||
const filePath = path.resolve(__dirname, 'test_upload.webp')
|
||||
const fileStream = fs.createReadStream(filePath)
|
||||
const now = new Date()
|
||||
const fileName = `test-image-${now.toISOString()}.jpg`
|
||||
uploadFile(fileStream, fileName).then((response) => {
|
||||
console.log(":)")
|
||||
console.log(response)
|
||||
}).catch((err) => {
|
||||
console.log(":|")
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
testUpload()
|
||||
BIN
test_upload.webp
BIN
test_upload.webp
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user