Code Monkey home page Code Monkey logo

analysis-account's Introduction

Requirements

  • Flask
  • pandas
  • WTForms

安装项目依赖

$ virtualenv --no-site-packages .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

修改配置文件

$ cp deploy/settings_secure.py settings/secure.py

开发启动项目

$ python app.py

Docker

构建方式

采用 BuildKit 多阶段构建方式, Docker 版本需大于 18.06。

修改/etc/docker/daemon.json, 加入{"experimental":true}

检查是否修改成功 $ docker version -f '{{.Server.Experimental}}'

启用多层构建方式,设置环境变量(可全局) DOCKER_BUILDKIT=1

正常打包

$ DOCKER_BUILDKIT=1 docker build -t yekingyan/analysisaccount .

pip环境有变的打包

#方法一:一次性build完
$ DOCKER_BUILDKIT=1 docker build -t yekingyan/analysisaccount --build-arg PIP_ENV=new .

#方法二:留下中间层方便下次使用
$ docker build --target new-env -t yekingyan/analysisaccount:env .
$ docker push yekingyan/analysisaccount:env
$ DOCKER_BUILDKIT=1 docker build -t yekingyan/analysisaccount .

启动容器

$ docker run -d -p 5354 yekingyan/analysisaccount .

ps: support docker-compose

analysis-account's People

Contributors

yekingyan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.